Advertisement
daymobrew

Genesis - limit category archive description to first page

Feb 13th, 2024
1,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | Source Code | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Genesis - limit category archive description to first page
  4. Description: Limit the category archive description to the first archive page.
  5. Plugin URI: https://www.damiencarbery.com/
  6. Version: 0.1
  7. Author: Damien Carbery
  8. */
  9.  
  10. defined( 'ABSPATH' ) || exit;
  11.  
  12.  
  13. add_action( 'genesis_before_loop', 'check_for_archive_first_page', 5 );
  14. function check_for_archive_first_page() {
  15.     if ( ! is_category() ) { return; }
  16.     if ( is_paged() ) {
  17.         remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement