How do I remove pagination from just some Categories?
Create 2 wp_query and put pagination on the first wp_query and remove pagination on second wp_query
Create 2 wp_query and put pagination on the first wp_query and remove pagination on second wp_query
Hi @eeyore: Without being able to see the full context of your theme page I think you have at least two issues. You need to use $wp_query instead of $my_query if you want previous_posts_link() and next_posts_link() to work since they assume $wp_query. What @Jan Fabry mentioned; you need to capture the pagination yourself and pass … Read more
I had a similar problem recently and determined the cause to be that when WordPress queries for posts in a category, it looks for posts with post_type equal to ‘post’ before it reaches the point where you query for post_type ‘any’ or some custom post type. This doesn’t cause a problem on page 1 because … Read more
As a starter, I recommend you review the discussion on a similar question regarding custom taxonomies and custom post types: Fixing Pagination with Custom Taxonomy Archive. You’ll probably need to work with the global rewrite/query variables and arguments to get things to work correctly.
You have to edit your theme. If you can paste the code of the page in question, i can tell you which part to remove. if you found something like <?php posts_nav_link(); ?> make sure to remove it have a backup first 😉
I think this will do what you want. But I still wonder whether sticky posts wouldn’t have been better… if (is_home() && $paged == ‘0’) { //$paged value is 0 on 1st page and not 1 ! query_posts(‘posts_per_page=7&paged=’.$paged.’&meta_key=_pull_leading3&meta_value=off’); } else { // recreate the home page “loop” to figure out which posts to exclude $excluded … Read more
I’m assuming that you’re talking about the “home page” when you say “1st page only”. Or are you talking about the first “paginated” page of your posts? If its the prior, you’d probably want to use the “is_front_page()” conditional if you’re using a single page.php template. Or maybe it’d be easier to make a “page-home.php” … Read more
Use the ‘offset’ parameter like in get_posts(). You can take the number of the page you’re on as value.
To make your life easier use one of the many pagination plugins or ones that i use all the time: WP-PageNavi WP-Paginate and in the case of these two its a matter of activating the plugin , setting up a few options and just drop a line of code to your page, for example if … Read more
You can specify either paged for simple pagination, or offset if you want to do something special. Calculating the offset yourself is easy: just multiply the current page number (minus two) with the number of posts per page, and add your start offset: $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $posts_per_page = get_option( ‘posts_per_page’ ), … Read more