Viewing 9 replies - 1 through 9 (of 9 total)
  • Tried this?

    https://www.themesandco.com/snippet/removing-the-post-navigation-block-of-links/

    Just remove also that

    if (!is_single())
       return;

    If you don’t want post navigation block appears in post lists.

    Thread Starter Immelting

    (@immelting)

    Thank you fr your prompt response.

    I went to the link got code..
    Do you want me to remove if ( !is_single() )
    return;

    add_action ( ‘wp_head’, ‘remove_single_post_nav_links’);
    function remove_single_post_nav_links() {
    //we only want to remove those nav links for a sinlge post and not for the list of posts
    if ( !is_single() )
    return;

    //this action is defined in the class-content-post_navigation.php file
    remove_action ( ‘__after_loop’ , array( TC_post_navigation::$instance , ‘tc_post_nav’ ), 20 );
    }

    And this is for all of the posts not just for one post?
    Thank you again,
    Deird

    Thread Starter Immelting

    (@immelting)

    Thank you so much d4z_c0nf,

    Worked like a charm,
    Deird

    You have to add that snippet to your functions.php in your child theme.
    If you paste that code as is it will remove “Older/Newer Posts” in every Posts.
    About these lines:

    if (!is_single())
      return;

    This check if is not a “post” (or a “page”) and will return without removing the action, so for categories(and search) you will still see “Older/Newer Posts”.

    So if you want to remove “Older/Newer Posts” also in categories and search, just get rid of those lines.

    Hope this explanation is better (sorry for my english). ??

    Just a thing. Remove that also for searches could not be a good choice.
    So replace that
    !is_single()
    with
    is_search()

    should be better..

    Thread Starter Immelting

    (@immelting)

    Sweet..
    Thank you so much.
    I am hopeful you are having a wonderful day.
    You made my day, thank you.
    Deird

    Glad to help.
    Have a wonderful day you too.

    hi, i have developed custom theme and it is working fine with xampp 3.2.1 but when i upload to server it got error on Add/Edit New post/page.

    When i click on any page/post for edit it shows perfectly the editor window but when i click on add/update the screen got blank with url like

    “myurl/wp-admin/post.php”

    and when i go back the content is updated what i have changed, currently i have not installed any plugins. pls help me…..

    oh!god

    yahoo! friends my prob. is resolved the cause is blank line is removed from every files.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove Post/Page Navigation & Newer/older posts Link’ is closed to new replies.