Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active October 14, 2020 13:58
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save braddalton/5030437 to your computer and use it in GitHub Desktop.
Save braddalton/5030437 to your computer and use it in GitHub Desktop.
Remove Pagination Genesis. This PHP code removes the page naviagtion from all archives Source http://wpsites.net/web-design/genesis-remove-page-navigation-pagination-from-any-archive-page/
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
@webcami
Copy link

webcami commented Feb 11, 2016

Hi Brad, is it possible to remove it from the homepage blog feed only? A client has ask me to do that for this site:

http://www.shordental.com/

@darrenbrett
Copy link

Hi Webcami,

I just did this same thing with the Genesis beautiful-pro theme. What I did was create a template page titled home.php. By including that code snippet on just this file, it removes pagination from the home page, but leaves it on for the blog page. The entire code for the file is below:

<?php
/**
 * This file adds the Landing template to the Beautiful Pro Theme.
 *
 * @author StudioPress
 * @package Beautiful Pro
 * @subpackage Customizations
*/

/*
Template Name: Home
*/

//* Add landing body class to the head
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );

//* Run the Genesis loop
genesis();

@parth333
Copy link

Greetings,

I am reading news on a website called 'MarketWatch' which requires a user to scroll down to load limited number of results, instead of all of them. Is it possible to use PHP for loading all results at once when opening the webpage?

@heathelin
Copy link

Hi WebCami, I noticed that you were able to remove the "next page" link in the blog section of your client's homepage. Did darrenbrett's suggestion above work for you or did you find another way?

Thanks

@braddalton
Copy link
Author

You can add the code to any template file like front-page.php, home.php or index.php. You can also use the code in a callback function with conditional tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment