• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

previous post / next post

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › previous post / next post

This topic is: resolved

Tagged: next, post navigation, previous

  • This topic has 14 replies, 3 voices, and was last updated 12 years, 9 months ago by wendycholbi.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • February 6, 2013 at 1:43 pm #18484
    verymom
    Member

    I am running Prose, and have the older / newer links at the bottom of the blog page, but would like to add the 'previous post / next post' links to individual post pages - I'd like to use the following code, which will turn those links into post titles.  In previous themes, I could just add this code to the single.php page - but I'm still utterly lost in the Genesis framework.  All the templates I'm used to are missing, buried, or hidden in function-type files.  So, help.  Where would something like this go?

    <code>

    <div class="navigation">
    <div class="alignleft">
    <?php previous_post('&laquo; &laquo; %',
    'Toward The Past: ', 'yes'); ?>
    </div>
    <div class="alignright">
    <?php next_post('% &raquo; &raquo; ',
    'Toward The Future: ', 'yes'); ?></code>

     

    February 6, 2013 at 2:29 pm #18496
    wendycholbi
    Member

    I suggest checking out these Genesis code snippets for post navigation -- the "next page" and "previous page" snippets may be what you're looking for. You can customize the link text as you wish.

    The instructions on those snippets say to add them to your functions.php file, but Prose works differently: Instead of modifying the functions.php file, you should place custom functions (PHP snippets) in Genesis --> Custom Code --> Custom Functions.

    And...welcome to Genesis! Yes, there is a learning curve, as there is with anything new -- but the end results, and the power and flexibility of the framework, are so worth it. The Genesis Tutorials and Code Snippets are great places to start digging in.


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    February 6, 2013 at 2:55 pm #18502
    verymom
    Member

    I've been using Genesis themes for a few years, but get overwhelmed every time I deal with customizing one.

    I don't see a Genesis -> Custom code -> Custom Functions in the menu.

    I have Genesis - Theme Settings, Design Settings, SEO Settings, Import / Export, Simple Comments, Simple Edits.

    Am I looking in the wrong place?  I've made other edits to the functions.php file, but this one won't work there.

     

     

    February 6, 2013 at 4:09 pm #18524
    wendycholbi
    Member

    Are you using Prose version 1.0? The Custom Code screen was added in version 1.5.

    You won't see a dashboard nag to update from 1.0 to 1.5 because it requires manual updating (I wrote a tutorial about the 1.0 --> 1.5 update process).


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    February 6, 2013 at 4:21 pm #18528
    verymom
    Member

    I suppose not - it's not a child theme so I don't want to upgrade.  (I've learned to do child themes since).  Any other way to add this?

    February 6, 2013 at 5:17 pm #18541
    wendycholbi
    Member

    Okay, I don't know what you mean by "it's not a child theme," because Prose is a child theme of the Genesis Framework. Prose 1.5 has some significant improvements over version 1.0 (not the least being the Custom Code screen, but also more and better Design Settings), so my default recommendation is to update, but it's your call as to whether that's more trouble than it's worth (for instance if you've made extensive modifications to the functions.php file).

    So, looking at your original question another way, you could probably insert your original code into one of the Genesis hooks, using the Genesis Simple Hooks plugin. Check out the Hook Reference and this Visual Hook Guide to find the hook you need.


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    February 6, 2013 at 5:24 pm #18544
    verymom
    Member

    Sorry, I meant that I directly edited Prose files rather than making a child theme to Prose.  So if I update it I will lose all my customizations.  It will be much more trouble than its worth.

    Can you explain in more detail about the hooks?  I've installed the plugin but the reference and hook guide gives me no clue as to how to take my code above and make it work.

    Thank you!

    February 6, 2013 at 7:44 pm #18562
    wendycholbi
    Member

    I would try pasting your code into Genesis --> Simple Hooks --> genesis_after_post_content hook (it's in the section of the page titled "Post/Page Hooks".

    Check the "Execute PHP on this hook?" checkbox, since your code contains PHP. Save your changes and see if the navigation links show up correctly on a single post.

    I tested this on a test site of mine, and this code worked (note the two closing div tags that were missing from your original code above):

    <div class="navigation">
    <div class="alignleft">
    <?php previous_post('&laquo; &laquo; %',
    'Toward The Past: ', 'yes'); ?>
    </div>
    <div class="alignright">
    <?php next_post('% &raquo; &raquo; ',
    'Toward The Future: ', 'yes'); ?>
    </div>
    </div>


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    February 6, 2013 at 8:50 pm #18567
    verymom
    Member

    Oh thank you!!  That worked, yay!

    February 6, 2013 at 9:28 pm #18570
    verymom
    Member

    Oh shoot - it's showing up on the main blog page, not just on single posts.  I have it in this section:
    genesis_after_post_content
    What can I do to make it only show on the single posts?

    February 6, 2013 at 9:30 pm #18572
    verymom
    Member

    Oh nevermind, I just added it to the
    genesis_after_comment_form
    area and that solved it.

     

    Thanks for all your help!

    February 6, 2013 at 9:45 pm #18575
    wendycholbi
    Member

    Hooray! Glad to hear you got it working.


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    February 13, 2013 at 1:16 pm #20121
    NewSeasonDesign
    Member

    This worked great!

    February 13, 2013 at 1:18 pm #20123
    NewSeasonDesign
    Member

    And thanks so much!!

    February 16, 2013 at 1:52 pm #20707
    wendycholbi
    Member

    Glad to hear it worked for you too!


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘previous post / next post’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble