WordPress.org

Ready to get started?Download WordPress

Forums

from single to page navigation (7 posts)

  1. sashadimitri
    Member
    Posted 1 year ago #

    Hi...

    So, for navigation in single, i have <?php previous_post_link ?> and <?php next_post_link ?> ... But I want to insert in the nav a link to 'page of posts' , too...

    How can I do that?

  2. keesiemeijer
    moderator
    Posted 1 year ago #

  3. sashadimitri
    Member
    Posted 1 year ago #

    Tried already... nothing works, yet.... other suggestions?

  4. keesiemeijer
    moderator
    Posted 1 year ago #

    What did you try? Which function did you use? On what theme template file did you try?

    Can you post the full code of the template file with the pagination functions here or use a pastebin. See the forum rules on how to post code.

  5. sashadimitri
    Member
    Posted 1 year ago #

    I'm developing a custom theme with The_s Starter Theme...

    I have posts and custom posts type

    This is code for navigation https://github.com/Automattic/_s/blob/master/inc/template-tags.php

  6. keesiemeijer
    moderator
    Posted 1 year ago #

    Tested this on my site and it works for me. Do you use any queries on the loop in your page of posts? On what template files is it not working (index.php, category.php, etc..)?

    http://codex.wordpress.org/Function_Reference/WP_Query
    http://codex.wordpress.org/Function_Reference/query_posts

  7. sashadimitri
    Member
    Posted 1 year ago #

    I think you understood wrong.... What I need is a function that will make a link to parent page

    Ex:
    from site.com/blog/cat1/post_name
    to site.com/blog

    or

    from site.com/portfolio/custom_post_type_name
    to site.com/portfolio

Topic Closed

This topic has been closed to new replies.

About this Topic