• I’m trying to remove the previous/next pagination from my posts using the Code Snippets plugin but I can’t get it to work. I know it has something to do with timing but I can’t figure it out. I’ve read similar support threads and tried the suggested fixes with no luck. This is the code I’m currently using.

    add_action( 'after_setup_theme', function () {
    
    //* Remove the post navigation (requires HTML5 theme support)
    remove_action( 'genesis_after_entry_content', 'genesis_prev_next_post_nav');
    	
    });

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    You might need to increase the priority on the action hook to make sure it runs after the theme:

    add_action( 'after_setup_theme', function () {
    	remove_action( 'genesis_after_entry_content', 'genesis_prev_next_post_nav' );
    }, 100 );

    Alternatively, you can use a later hook like init:

    add_action( 'init', function () {
    	remove_action( 'genesis_after_entry_content', 'genesis_prev_next_post_nav' );
    } );
Viewing 1 replies (of 1 total)

The topic ‘remove_action not working’ is closed to new replies.