Pagination for connected posts on single post template
I modified single-event.php to show the Event details and connected posts below it. I want to paginate the posts. I have this code to show related posts on my event:
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
$connected = new WP_Query( array( 'connected_type' => 'posts_to_events', 'connected_items' => get_queried_object(), 'posts_per_page' => 5, 'paged' => get_query_var( 'paged' ), ) );
http://localhost/event/event-name/page/2redirects me back to
http://localhost/event/event-name/so I can’t see more than the most recent connected posts.
I know the single post template is only meant to show the current post, so I’m not sure what I should do. Hope someone can give me a clue. Thanks
- The topic ‘Pagination for connected posts on single post template’ is closed to new replies.