• Home
  • Blog
  • Showcase
  • Setup Docs
    • Sunshine Help
    • Flex Help
  • Support
    • Support Area
    • Contact us
    • Feedback
  • Connect
    • Newsletter
    • Twitter
    • Facebook
  • My Account
  • Flex
  • Sunshine
Support : Simple Pro Themes

Support : Simple Pro Themes

[Resolved] Previous Post & Next Post Settings

If you have purchased a product, please enter the email address that you used to register at time of purchase.
Log In
Lost Password

Create an Account
  • Your username must be unique, and cannot be changed later.
  • We use your email address to email you a secure password and verify your account.

Support › Forums › General Tips › Previous Post & Next Post Settings

  • This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by Davinder Singh Kanith.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • October 25, 2015 at 12:59 pm #615
    chasingthedonkeY
    Participant

    Sorry, I know the answer to this must be so simple, but i cant find how to turn off the ” Previous Post & Next Post Settings” – can you help? Thanks.

    October 25, 2015 at 1:03 pm #616
    Davinder Singh Kanith
    Moderator

    Remove the following code from functions.php file

    //* Showing post nav in single post page
    add_action( 'genesis_after_entry', 'flex_prev_next_post_nav', 5 );
    function flex_prev_next_post_nav() {
    
      if ( ! is_singular( 'post' ) )
        return;
    
      genesis_markup( array(
      	'html5'   => '<div %s>',
      	'xhtml'   => '<div class="navigation">',
      	'context' => 'adjacent-entry-pagination',
      ) );
    
      echo '<div class="pagination-previous alignleft">';
      
      if( is_rtl() )
        previous_post_link('<span class="dashicons dashicons-arrow-right-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
      else
        previous_post_link('<span class="dashicons dashicons-arrow-left-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
        
      echo '</div>';
    
      echo '<div class="pagination-next alignright">';
      
      if( is_rtl() )
        next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-left-alt2"></span><br/>%link');
      else
        next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-right-alt2"></span><br/>%link');
        
      echo '</div>';
    
      echo '</div>';
      
    }
    
    October 25, 2015 at 1:32 pm #618
    chasingthedonkeY
    Participant

    Perfect – thanks team

    November 25, 2015 at 3:29 pm #681
    chasingthedonkeY
    Participant

    Sorry, I want to add this back now (sorrry) where should I add the code? Before/after what?

    November 25, 2015 at 6:04 pm #683
    Davinder Singh Kanith
    Moderator

    Add the following code at end of functions.php file.

    //* Showing post nav in single post page
    add_action( 'genesis_after_entry', 'flex_prev_next_post_nav', 5 );
    function flex_prev_next_post_nav() {
    
      if ( ! is_singular( 'post' ) )
        return;
    
      genesis_markup( array(
      	'html5'   => '<div %s>',
      	'xhtml'   => '<div class="navigation">',
      	'context' => 'adjacent-entry-pagination',
      ) );
    
      echo '<div class="pagination-previous alignleft">';
      
      if( is_rtl() )
        previous_post_link('<span class="dashicons dashicons-arrow-right-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
      else
        previous_post_link('<span class="dashicons dashicons-arrow-left-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
        
      echo '</div>';
    
      echo '<div class="pagination-next alignright">';
      
      if( is_rtl() )
        next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-left-alt2"></span><br/>%link');
      else
        next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-right-alt2"></span><br/>%link');
        
      echo '</div>';
    
      echo '</div>';
      
    }
    November 25, 2015 at 8:47 pm #686
    chasingthedonkeY
    Participant

    Holy crap, I just added it and as I clicked sav, it said ‘Server error

    500 and now the site wont load and I cant get back to the dashboard…. what now?

    November 26, 2015 at 1:59 am #689
    Davinder Singh Kanith
    Moderator

    Website is up, looks like you got that working – isn’t it?

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Copyright © 2022 · Simple PRO Themes for Genesis Framework · About · FAQs · Contact · Affiliates