Hi Daniel, I really hope you can help me. I’ve been modifying the styles of the theme and have created a home page template that pulls in copy from the home page but also grabs the slider loop as well (get_template_part( ‘loop’, ‘slider’ );).
The trouble I’m running into is that the slider will only pull in the first four posts and so not give the user an option to click on the arrow and view the next four as it does on the index page.
Any tips will be very gratefully received as I find myself completely stuck at this point!
Thanks very much
Kev
You probably have a custom query at the top of the template and are missing this parameter:
'paged' => max( 1, get_query_var( 'paged' ) ),
Also, it’s recommended to use a WP_Query
object and not the query_posts
function.
Thanks Daniel, I actually already managed to find my way to a solution by swapping out:
“‘paged’ => $paged”
for
“‘&paged=’.$paged”
and installing a plugin called WP-Paginate. Sadly my understanding of ‘the loop’ is not all it should be so I don’t fully grasp why this works, but the important thing is that it does!
All the best
Kev