Posts by PaulWinslow

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Ahhh that’s perfect. I could kiss you!

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Am I supposed to replace some of these variables with something else? $post_id etc?

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Afternoon,

I’m trying to get the post thumbnail / featured image from a custom post-type to use it as the background image of each post in my loop..

I found this: http://wpengineer.com/2123/use-wordpress-post-thumbnail-as-background-image/

But it doesn’t work.

The fallback image is used just fine, but if you set a featured image to the post it doesn’t work, it doesn’t get the image URL at all, so I end up with..

.project-scroll { background: url(’ ‘) 50% 0 no-repeat fixed; }

At the moment I don’t see how the code in the tutorial is supposed to actually work, because I can’t see how it’s supposed to check if there’s an image set when my loop is in a custom page template elsewhere..

Has anybody managed to do this? Any help would be brilliant.

No inline styles.

Cheers,
Paul

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Thanks very much!

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Just a cheeky post to see if anybody had a spare Dribbble invite they could throw this way?

I closed up shop with design & theming earlier this year and ended up closing my account – my fault, I know.

Anybody in a giving mood? :)

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says
322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

I still can’t get this to work…

http://snippi.com/s/fm2dud8

This time I’m not querying a custom post-type, these are just standard posts in a magazine theme..

This loop is in a custom page-template which is set as the static front-page..

The page links are there but it does not go to page 2.. it shows the same posts as page 1 and the “1” link is still active..

Any help?

Cheers!

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

It just isn’t working. Page 2 just shows the same posts from Page 1.

This paging shit always gets me.

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Hey Paul,

I wish this will help you :)

<?php
if ( get_query_var('paged') ) {
    $paged = get_query_var('paged');
} elseif ( get_query_var('page') ) {
    $paged = get_query_var('page');
} else {
    $paged = 1;
}
$current_page = $paged;

$arg = array ( 
    'posts_per_page'        => any number,
    'orderby'                => order by anything,
    'order'                    => desc or asc?,
    'post_type'               => your post type goes here,
    'paged'                    => $paged,
    'ignore_sticky_posts'    => 1
);

//Start The WP Query
$posts_query = new WP_Query($arg);

$pagination_text =  paginate_links(
    array(  
        'base'         => @add_query_arg( $paged_var, '%#%' ),
        'format'       => '',  
        'current'      => $current_page,  
        'total'        => $posts_query->max_num_pages, 
        'show_all'     => false,
        'end_size'     => 1,
        'mid_size'     => 5,
        'prev_next'    => true,
        'prev_text'    => '«',  
        'next_text'    => '»',
        'type'         => 'plain'
    )
);

// Put your loop here

echo $pagination_text;
wp_reset_query();
?>

I ran something very similar and it does not correctly move onto page 2. This exact code doesn’t seem to do the trick, either.

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Hi guys. I’m looping a custom post-type in a custom page template – what’s the cleanest way to have numbered pagination here? No plugins.

Cheers!

by
by
by
by
by
by