Remove /Page/ from slug when we’re visiting 2nd and other inner pages of the blog page
Remove /Page/ from slug when we’re visiting 2nd and other inner pages of the blog page
Remove /Page/ from slug when we’re visiting 2nd and other inner pages of the blog page
Had to use Modulo to calculate the paginated pages. Working code snippet below shows the image after every 5th post on every 3rd page (page 3, 6, 9, etc.) <?php if ($count == 5 && is_paged() && get_query_var(‘paged’) && $paged % 3 == 0 ) { echo ‘<center>IMAGE GOES HERE</center>’; } else { echo ”; … Read more
A couple of points you should try out: Remove the ‘paged’ => $loop->query_vars[‘paged’] from your $pagination array. It’s not a parameter in the docs. Remove the ‘base’ => @add_query_arg(‘paged’,’%#%’) from your $pagination array. I believe WordPress catches the paged parameter using the default page parameter. Which is it’s default. Here are the docs for the … Read more
The solution: <?php // building query $zephyr_cat = get_post_meta($post->ID, ‘zephyr_category’, true); $paged = is_front_page() ? get_query_var( ‘page’ ) : get_query_var( ‘paged’ ); if ( $zephyr_cat == 0 ) { $zephyr_q = new WP_query(‘posts_per_page=”.get_option(“posts_per_page’) . ‘&paged=’ . $paged); } else { $zephyr_q = new WP_query(‘cat=”.$zephyr_cat . “&paged=’ . $paged); } The explanation: the previous code was … Read more
I tried reverting back to the older version 3.0.x, but the problem remained the same. The answer can be found here: https://stackoverflow.com/questions/5843214/wordpress-loop-problem-multiple-loops-index-php-and-is-paged-causing-duplicate/5853514#5853514
Perhaps set your form’s action to point to the first page of paged results, rather than the default (empty) of the current page. <form action=”_URL_to_first_page_” method=”POST”> Keep in mind the URL is determined on the client side in the case of an empty action.
Try to change the pt_pagination position <?php wp_reset_postdata();?> <?php pt_pagination(); ?> Or you can try Pippin code https://github.com/pippinsplugins/EDD-Starter-Theme/blob/master/front-page.php#L5-L14
You have two queries that look to me to be competing. You are using query_posts to alter the main query but are not including any of your filters in that one. You are creating a new query with your filters– ‘meta_key’ => ‘start_date’, etc– and looping over that query result set to show your posts. … Read more
query_posts() should not be used in general and especially when dealing with pagination. You need to be making adjustments before template is reached, usually via pre-get-posts hook, on which there is plenty of material on site.
From next_posts_link: Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the ‘max_num_pages’ property of the custom WP_Query object. next_posts_link( ‘Next →’, $connected->max_num_pages );