Why is page link showing up on post?

  • raindance

    #16792

    Like on this page…

    http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress

    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.

    raindance

    #16793

    Duh-

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

    on

    http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress

    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:

    http://www.businessinsider.com/best-first-class-airlines-2010-12#-10-thai-airways-1

    Installation

    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.

    Thanks!

    raindance

    #16794

    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'
    ) );?>

    Thanks!

    raindance

    #16795

    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.

    http://juicytravels.com/the-ten-best-first-class-airline-experiences-now-2/

    raindance

    #16796

    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.

    http://juicytravels.com/the-ten-best-first-class-airline-experiences-now-2/

    Mod

    Kenneth John Odle

    #16797

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

    Jon Lynch

    #16798

    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.

    Cheers

    Jon

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

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