sorry I probably didn't word the question properly. So i'll describe what im trying to achieve.
I have Page A that has a slider of the different posts. When you click on one it redirects you to the full article(Page B) which also has the same slider. Page B where the full article is has the "next" and "prev" buttons to cycle through the other available posts. For example there are #10 posts in Page A slider, #5 is chosen so this should redirect to the full article of #5 on Page B. And this is where my issues lie.
The slider and query for both page A and B is like this:
<?php
$args = array (
'posts_per_page' => -1,
'post_type' => 'blog'
);
$blog_list = new WP_Query($args);
?>
<?php if( $blog_list->have_posts() ):?>
<?php while( $blog_list->have_posts() ) : $blog_list->the_post();?>
<li class="column swiper-slide">
<div>
<?php echo '<a href="'. get_permalink($post->ID) .'">'; ?>
</div>
</li>
<?php endwhile;?>
<?php endif; ?>
<?php wp_reset_query();
I believe It is a query issue because the URL bar of page B displays the correct link but page B article shows #1 but it should show #5. How should i adjust the query? or if someone could let me know what part of the wordpress doc i should be reading up that would be great as im actually new to this.