Support » Fixing WordPress » WordPress Default Theme Navigation

  • Resolved zdebx

    (@zdebx)


    I’m trying to remove the “next” and “previous” post links above each post that I have on my blog (using default Kubrick theme)

    So what I’m talking about are the links between the header and the actual post.

    I searched around, and found out that I need to change “add_action” to “remove_action” in the default-filters php file, located in wp-includes folder.

    Here’s what I’ve done:

    remove_action( ‘wp_head’, ‘parent_post_rel_link’, 10, 0 );
    remove_action( ‘wp_head’, ‘start_post_rel_link’, 10, 0 );
    remove_action( ‘wp_head’, ‘adjacent_posts_rel_link’, 10, 0 );

    However, the problem is that I still get the links displayed to next and previous posts, as normal.

    Any ideas?

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    I think that is on a single post page. Just look in single.php and delete:

    <div class="navigation">
    			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
    			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    		</div>

    right after
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    esmi

    (@esmi)

    Forum Moderator

    I’d actually re-insert those actions that you removed as well. They output link rel lines in the <head></head> section that are not displayed on the page but that are used by some kinds of assistive software to provide additional user support.

    keesiemeijer, thank you very much! That’s exactly what I needed. Works perfect now.

    esmi, I’ve readded those actions, as you recommended.

    Thanks for the quick responses guys. Appreciate that.

    Good luck

    Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    Glad you got it working! Now, please use the dropdown at top right to mark this topic ‘Resolved’.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress Default Theme Navigation’ is closed to new replies.