Support » Fixing WordPress » Hiding “Previous Entry” posts from top of a post page

  • Resolved reparde

    (@reparde)


    Hello. I wonder if you can help with a question for me.

    I am using WP for a new website… but I need certain information to be stored as posts rather than pages. I have been using WP successfully for about 3 years now – and love it.

    However – right at the top of each post, it displays the titles of the previous post, and the next post. This is standard to all WP themes I have seen thus far. Does anyone know where I would go to stop that generating? I simply don’t want it to display on my posts.

    I have moderate WP knowledge, and am okay to edit theme files and templates as long as I am pointed in the right direction.

    Many thanks in advance from a woman in dire need of a large glass of wine right now!

Viewing 7 replies - 1 through 7 (of 7 total)
  • likely the code is in theme’s single.php and possibly index.php
    without a site link or theme name – hard to say for sure

    maybe you can try to find the ‘Previous Entry’ in your theme code. in theory any code use this is part of the reason why its show.

    or if you find any, then submit here any code near it. i will tell you where and what to erase.

    can you give the blog url ?

    Hi all. Thanks for your help – I just didn’t know where to start looking. I did have a look in the two editor files you mentioned… but I’m just unsure. The following code was in index.php.

    $prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick'));
    $next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));

    I am guessing that I can delete out the wording between the single apostrophes? For example… Delete “Newer Entries »” which is similar to me deleting out “Comments are closed” in my comments file to stop that sentence showing? Am I guessing correctly? I might just go ahead and test it anyway – hey, I backup stuff so I can’t break it, can I?

    The site isn’t accessible live yet, as it’s being built behind the scenes – so sorry – I know I’m asking you guys to take a stab in the dark.

    Guys – your help is very much appreciated!

    xx

    Right – I gave that a try… but it didn’t work. Here is an example link (that I hope I can delete out of this post afterwards).

    http://www.canarynightlife[dot]com/rooftops

    You will see that towards the top it is pointing to the post before… and the post after. It is those two links I want to remove (Restaurant de Mar, and The Snug). Those words wouldn’t exist in the file… so I guess I would need to find whatever it is that generates them, and get rid of that.

    Thanks again for all your help xx

    Sorry… obviously replace the word “dot” with a dot. I just don’t want the search engines finding it yet – I have it blocked until the site is completed and I migrate from .net to .com x

    you will need to remove or comment out the whole statement

    $prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick'));
    $next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));

    for it to work
    single.php

    Thank you so very much samboll – very much appreciated! It has worked perfectly!

    Sorry about the delay in replying – I managed to squeeze in a weekend.

    Thanks again

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hiding “Previous Entry” posts from top of a post page’ is closed to new replies.