Problem with splittest on frontpage and pagination
-
Hi,
I am using the pro version of your plugin and have a problem.
I have setup a splittest for the frontpage to test different styles for the post listing.So I copied the page and applied a different template to the variation.
This way I also have a different permalink for the variation, which we need for the analytics side of things.But now on the variation – the pagination is broken and doesn’t work anymore.
This is the code i use for pagination:
php <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1; $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => get_option('posts_per_page'), 'page' => $page, ); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); get_template_part('parts/split-tests/frontpage/content', 'list'); } if ($query->max_num_pages > 1) { ?> <nav class="pagination-container"> <ul class="pagination"> <li class="prev-posts-link"> <?php echo get_next_posts_link('See more', $query->max_num_pages); ?> </li> <li class="next-posts-link"> <?php echo get_previous_posts_link('Newer Entries'); ?> </li> </ul> </nav> <?php } } else { get_template_part('parts/content', 'none'); } wp_reset_query(); ?>
Any info on how to solve this would be greatly appreciated!
Thanks,
Steve
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem with splittest on frontpage and pagination’ is closed to new replies.