Why is page link showing up on post?

  • raindance


    Like on this page…


    I’m not sure which file to put these in and where. I do have a child theme up with a functions.php and style.css file there. Sorry to ask such a basic question when there is so much detail on this link but I just don’t see where it says where to paste all of this in?

    I’ve looked online for a tutorial and don’t see one.




    I just saw the installation showing which file to put it on. (below)



    Down by FAQs.

    I’ll give it a try.

    Would also love to know how you do your option #1 suggestion and any other thoughts you have to accomplish this. What I’m really trying to do is mimic this layout and functionality:



    Upload ambrosite-post-link-plus.php to the /wp-content/plugins/ directory.

    Activate the plugin through the Plugins menu in WordPress.

    Edit your single.php file (plus any other single post template files you may have created), and replace the next_post_link and previous_post_link template tags with next_post_link_plus and previous_post_link_plus. Configure them using parameters as explained above.




    Also..in Graphene, in my child theme folder, do I just make a new one called single.php or do I need to do the loop-single.php

    On the single.php file in Grahpene, it says use loop-single.php if you want to “overload” the existing one? Does this mean I need to do the loop-single.php or just make a new single.php in the child folder and add for example:

    <?php previous_post_link_plus( array(
    'order_by' => 'post_title',
    'loop' => true,
    'max_length' => 30,
    'tooltip' => 'Previous post',
    'in_same_cat' => true,
    'ex_posts' => '5, 12'
    ) );?> |
    <?php next_post_link_plus( array(
    'order_by' => 'post_title',
    'loop' => true,
    'max_length' => 30,
    'tooltip' => 'Next post',
    'in_same_cat' => true,
    'ex_posts' => '5, 12'
    ) );?>




    When I put the code above on a new single.php file in the child folder, the content on my page goes away and only the links are there.




    And when I put it on loop-single.php, the design part of the page shows up, like the header and top nav links, but the post itself doesn’t show up.



    Kenneth John Odle


    Be sure to put code between backticks (`). Thanks!

    Jon Lynch


    To make the built in navigation functions stay in categories you need to add TRUE to the previous_post_link() and next_post_link() functions on lines 29 & 30 of loop.php

    I use:

    <p id="previous"><?php previous_post_link('« %link', '%title', TRUE); ?></p>
    <p id="next-post"><?php next_post_link('%link »', '%title', TRUE); ?></p>

    If you are using a child theme copy loop.php to your child theme directory before making the changes, that way they will not be overwritten when Graphene is updated.

    More information is available in the codex at http://codex.wordpress.org/Function_Reference/next_post_link

    This method reduces the number of plugins required but would make all navigation on the site follow categories. It also gets confusing when posts are in more than one category.



Viewing 7 posts - 11 through 17 (of 17 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.
Graphene Themes Forum