• 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

Entry Pagination next and previous 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 › General Discussion › Entry Pagination next and previous post

This topic is: not resolved
  • This topic has 9 replies, 2 voices, and was last updated 8 years, 11 months ago by Victor Font.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • May 26, 2017 at 8:37 am #207026
    famarinu
    Member

    HI,
    how do I view the previous and next at the bottom of the home and the archives?
    Thank you

    May 26, 2017 at 10:57 am #207037
    Victor Font
    Moderator

    There shouldn't be anything to turn on. Pagination is enabled by default. Make sure you have more posts than are set to display in the Genesis / Theme Settings / Content Archives area.

    You may also want to search your child theme's functions.php for genesis_posts_nav in case the developer disabled it.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 27, 2017 at 11:01 pm #207079
    famarinu
    Member

    I checked in the topic settings area; Content archive and the insertion page is numeric.
    I also checked in function.php and genesis_posts_nav is not disabled.
    What do I do now?

    Thank you

    May 27, 2017 at 11:13 pm #207081
    famarinu
    Member

    I tried adding this code:

    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Setup Theme
    include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );
    
    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'lifestyle', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'lifestyle' ) );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Lifestyle Pro Theme', 'lifestyle' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/lifestyle/' );
    define( 'CHILD_THEME_VERSION', '3.1' );
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Enqueue Scripts
    add_action( 'wp_enqueue_scripts', 'lifestyle_load_scripts' );
    function lifestyle_load_scripts() {
    	
    	wp_enqueue_script( 'lifestyle-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    	
    	wp_enqueue_style( 'dashicons' );
    	
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Droid+Sans:400,700|Roboto+Slab:400,300,700', array(), CHILD_THEME_VERSION );
    	
    	wp_enqueue_script( 'respond', get_stylesheet_directory_uri() . '/js/respond.js', array( 'jquery' ),'true' );
    	
    }
    
    //* Add new image sizes
    add_image_size( 'home-large', 634, 360, TRUE );
    add_image_size( 'home-small', 266, 160, TRUE );
    
    //* Add support for custom background
    add_theme_support( 'custom-background', array(
    	'default-image' => get_stylesheet_directory_uri() . '/images/bg.png',
    	'default-color' => 'efefe9',
    ) );
    
    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    	'header_image'    => '',
    	'header-selector' => '.site-title a',
    	'header-text'     => false,
    	'height'          => 110,
    	'width'           => 320,
    ) );
    
    //* Add support for additional color style options
    add_theme_support( 'genesis-style-selector', array(
    	'lifestyle-pro-blue'    => __( 'Lifestyle Pro Blue', 'lifestyle' ),
    	'lifestyle-pro-green'   => __( 'Lifestyle Pro Green', 'lifestyle' ),
    	'lifestyle-pro-mustard' => __( 'Lifestyle Pro Mustard', 'lifestyle' ),
    	'lifestyle-pro-purple'  => __( 'Lifestyle Pro Purple', 'lifestyle' ),
    	'lifestyle-pro-red'     => __( 'Lifestyle Pro Red', 'lifestyle' ),
    ) );
    
    //* Reposition the primary navigation
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );
    
    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'lifestyle_author_box_gravatar' );
    function lifestyle_author_box_gravatar( $size ) {
    	return 96;
    		
    }
    
    //* Remove the author box on single posts XHTML Themes
    remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
    //* Remove the author box on single posts HTML5 Themes
    remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
    
    //* Modify the size of the Gravatar in the entry comments
    add_filter( 'genesis_comment_list_args', 'lifestyle_comments_gravatar' );
    function lifestyle_comments_gravatar( $args ) {
    
    	$args['avatar_size'] = 60;
    	return $args;
    	
    }
    
    //* Remove comment form allowed tags
    add_filter( 'comment_form_defaults', 'lifestyle_remove_comment_form_allowed_tags' );
    function lifestyle_remove_comment_form_allowed_tags( $defaults ) {
    	
    	$defaults['comment_notes_after'] = '';
    	return $defaults;
    
    }
    
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );
    
    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'lifestyle' ),
    	'description' => __( 'This is the top section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-middle',
    	'name'        => __( 'Home - Middle', 'lifestyle' ),
    	'description' => __( 'This is the middle section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom-left',
    	'name'        => __( 'Home - Bottom Left', 'lifestyle' ),
    	'description' => __( 'This is the bottom left section of the homepage.', 'lifestyle' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom-right',
    	'name'        => __( 'Home - Bottom Right', 'lifestyle' ),
    	'description' => __( 'This is the bottom right section of the homepage.', 'lifestyle' ),
    ) );
    
    //*FONT PERSONALIZZATO
    add_action('wp_print_styles', 'add_custom_font'); 
    function add_custom_font() {
        $url = 'http://www.ricettetichette.it/wp-content/themes/lifestyle-pro/fonts/gothambook/stylesheet.css';
        wp_register_style('gothambook', $url);
        wp_enqueue_style('gothambook');
        $url = 'http://www.ricettetichette.it/wp-content/themes/lifestyle-pro/fonts/gothammedium/stylesheet.css';
        wp_register_style('gothammedium', $url);
        wp_enqueue_style('gothammedium');
    }
    
    //* link per LASCIARE un commento
    function respond_fun() {
        echo '<div class="mycomm">Puoi aggiungere un commento cliccando <a href="#" ID="add_respond_id"><strong>QUI</strong></a></div>';
    };
    add_action('genesis_before_comments', 'respond_fun');
    
    //* frase sopra ai commenti
    add_filter( 'genesis_title_comments', 'sp_genesis_title_comments' );
    function sp_genesis_title_comments() {
    	$title = 'ALTRI COMMENTI';
    	return $title;
    }
    
    //* LISTA DEI COMMENTI DOPO L'AGGIUNTA DEI COMMENTI (list of comments) change yourprefix_ to yours  
    function yourprefix_reorder_comment_form_before_discussion() {
    	if ( is_single() && have_comments() ) {
    		remove_action( 'genesis_comment_form', 'genesis_do_comment_form' );
    		add_action( 'genesis_comments', 'genesis_do_comment_form' , 1 );
    	}
    }
    add_action( 'genesis_before_comments' , 'yourprefix_reorder_comment_form_before_discussion' );
    
    //* testo prima del form commenti
    add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' );
    function sp_comment_form_defaults( $defaults ) {
    	$defaults['title_reply'] = __( '<p style="margin-top:25px; color:#a5a5a3; font-weight: bold;">SCRIVI un COMMENTO</p>' );
    	return $defaults;
    }
    
    //**PERSONALIZZAZIONE DEL FORM COMMENTI aggiunta privacy e note legali**/
    add_filter( 'comment_form_defaults', 'crunchify_custom_comment_form' );
    function crunchify_custom_comment_form($fields) { 
        $fields['label_submit'] = __( 'INVIA COMMENTO', 'custom' ); //Cambia TESTO bottone INVIA COMMENTO
        return $fields;
    }
    
    //* Customize the entire footer
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    add_action( 'genesis_footer', 'custom_footer' );
    function custom_footer() {
    ?>
    	<p>&copy; Copyright <?php echo date("Y"); ?>  &middot;  <a href="http://www.ricettetichette.it/">RICETTETICHETTE</a> &middot;  <a href="http://www.ricettetichette.it/note-legali/" rel="nofollow" target="_blank" >Note Legali</a>  &middot;  <a href=" http://www.ricettetichette.it/privacy-e-cookie-policy/" rel="nofollow" target="_blank">Privacy e Cookie Policy</a>  </p>
    
    <?php } 
    
    //**Modifica Cerca nel mio blog**/
    add_filter( 'genesis_search_text', 'sp_search_text' );
    function sp_search_text( $text ) {
    	return esc_attr( 'Cerca nel blog' );
    }
    
    //**Stili personalizzati**/
    function add_style_select_buttons( $buttons ) {
    array_unshift( $buttons, 'styleselect' );
    return $buttons;
    }
    // Register our callback to the appropriate filter
    add_filter( 'mce_buttons_2', 'add_style_select_buttons' );
    
    //add custom styles to the WordPress editor
    function my_custom_styles( $init_array ) {  
    
        $style_formats = array(  
            // These are the custom styles
            array(  
                'title' => 'Titoli Post',  
                'block' => 'span',  
                'classes' => 'titopost',
                'wrapper' => true,
            ),
            array(  
                'title' => 'Immagine sfuocata',  
                'block' => 'span',  
                'classes' => 'sfocatura',
                'wrapper' => true,
            ),  
            array(  
                'title' => 'Immagine',  
                'block' => 'span',  
                'classes' => 'foto',
                'wrapper' => true,
            ),
            array(  
                'title' => 'Fonte',  
                'block' => 'span',  
                'classes' => 'fonte',
                'wrapper' => true,
            ),
            array(  
                'title' => 'Esempio',  
                'block' => 'span',  
                'classes' => 'esempio',
                'wrapper' => true,
            ),
    	array(  
    		'title' => 'Back Button',  
    		'block' => 'span',  
    		'classes' => 'back-button',
    		'wrapper' => true,
    	),
    		array(  
    			'title' => 'Interlinea 1',  
    			'block' => 'div',  
    			'classes' => 'int1',
    			'wrapper' => true,
    		),
    		array(  
    			'title' => 'Interlinea 2',  
    			'block' => 'div',  
    			'classes' => 'int2',
    			'wrapper' => true,
    		),
    		array(  
    			'title' => 'Interlinea 3',  
    			'block' => 'div',  
    			'classes' => 'int3',
    			'wrapper' => true,
    		),
    	);  
        // Insert the array, JSON ENCODED, into 'style_formats'
        $init_array['style_formats'] = json_encode( $style_formats );  
        
        return $init_array;  
     
    }
    // Attach callback to 'tiny_mce_before_init'
    add_filter( 'tiny_mce_before_init', 'my_custom_styles' );
    
    //* modifica label NOME E MAIL
    add_filter('comment_form_default_fields', 'custom_fields');
    function custom_fields($fields) {
        $commenter = wp_get_current_commenter();
        $req = get_option( 'require_name_email' );
        $aria_req = ( $req ? " aria-required='true'" : '' );
        $fields[ 'author' ] = '<p class="comment-form-author">'.
          '<label for="author">' . __( 'NOME o nickname' ) .  ( $req ? '<span class="required">*</span>' : '' ). '</label>'.
          '<input style="border: 1px solid #eeeee8;" id="author" name="author" type="text" value="'. esc_attr( $commenter['comment_author'] ) .
          '" size="30" tabindex="1"' . $aria_req . ' /></p>';
        $fields[ 'email' ] = '<p class="comment-form-email">'.
          '<label for="email">' . __( 'e-mail* (l\'indirizzo non sarĂ  pubblicato)' ) . ( $req ? '<span class="required"></span>' : '' ). '</label>'.
          '<input style="border: 1px solid #eeeee8;" id="email" name="email" type="text" value="'. esc_attr( $commenter['comment_author_email'] ) .
          '" size="30"  tabindex="2"' . $aria_req . ' /></p>
    <p style="text-align: justify; line-height: initial; font-size:12px; margin-top: 25px;"><input type="checkbox" name="ckb-p" id="ckb-p"  onclick="unlock(\'ckb-p\',\'ckb-l\', \'submit\')" />   *ho letto ed accetto le <a href="http://www.ricettetichette.it/note-legali/">NOTE LEGALI</a> di RicettEtichette ivi inclusi <a href="http://www.ricettetichette.it/note-legali/#disclaimer">Disclaimer - Condizioni e termini d\'uso</a>,<br><a href="http://www.ricettetichette.it/note-legali/#privacy">Privacy e Cookie Policy</a> del sito.</p>
    <p style="text-align: justify; line-height: initial; font-size:12px;"><input type="checkbox" name="ckb-l" id="ckb-l"  onclick="unlock(\'ckb-p\',\'ckb-l\',\'submit\')" />   *autorizzo il trattamento dei miei dati personali ai sensi del D.Lgs. n. 196/2003.</p>
    ';
    	return $fields;
    }
    
    //***Personalizzare TinyMCE editor font color**/
    function wp_tinymce_options( $newcolors ) {
    	$default_colours = '
    		"000000", "Black",
    		"993300", "Burnt orange",
    		"333300", "Dark olive",
    		"003300", "Dark green",
    		"003366", "Dark azure",
    		"000080", "Navy Blue",
    		"333399", "Indigo",
    		"333333", "Very dark gray",
    		"800000", "Maroon",
    		"FF6600", "Orange",
    		"808000", "Olive",
    		"008000", "Green",
    		"008080", "Teal",
    		"0000FF", "Blue",
    		"666699", "Grayish blue",
    		"808080", "Gray",
    		"FF0000", "Red",
    		"FF9900", "Amber",
    		"99CC00", "Yellow green",
    		"339966", "Sea green",
    		"33CCCC", "Turquoise",
    		"3366FF", "Royal blue",
    		"800080", "Purple",
    		"999999", "Medium gray",
    		"FF00FF", "Magenta",
    		"FFCC00", "Gold",
    		"FFFF00", "Yellow",
    		"00FF00", "Lime",
    		"00FFFF", "Aqua",
    		"00CCFF", "Sky blue",
    		"993366", "Brown",
    		"C0C0C0", "Silver",
    		"FF99CC", "Pink",
    		"FFCC99", "Peach",
    		"FFFF99", "Light yellow",
    		"CCFFCC", "Pale green",
    		"CCFFFF", "Pale cyan",
    		"99CCFF", "Light sky blue",
    		"CC99FF", "Plum",
    		"FFFFFF", "White"
    		';
    	$custom_colours = '
    		"f1c8b2", "ROSA",
    		"a5a5a3", "GRIGIO",
    		"eeeee8", "GRIGIO BORDI",
    		';
    	$newcolors['textcolor_map'] = '['.$default_colours.','.$custom_colours.']';
    	$newcolors['textcolor_rows'] = 8; // IMPORTANTE per espandere la tavolozza dei colori con 8 righe
    	
    	return $newcolors;
    }
    add_filter('tiny_mce_before_init', 'wp_tinymce_options');
    
    //***Personalizzare dimensione carattere**/
    if ( !function_exists( 'wp_tinymce_font_sizes' ) ) {
    	function wp_tinymce_font_sizes( $sizes ){
    		$sizes['fontsize_formats'] = "9px 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 26px 28px 30px 32px 34px 36px";
    		return $sizes;
    	}
    }
    add_filter( 'tiny_mce_before_init', 'wp_tinymce_font_sizes' );
    
    //***Personalizzare Registrato sotto:**/
    add_filter( 'genesis_post_meta', 'mw_change_filedunder' );
    function mw_change_filedunder($post_meta) {
        if ( !is_page() ) {
            $post_meta = '[post_categories sep="/" before="Categoria: "] [post_tags sep="/" before="Tags: "]';
            return $post_meta;
        }
    }
    
    //* Modify the author says text in comments
    add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' );
    function sp_comment_author_says_text() {
    	return '';
    }
    
    //* Modifica breadcrumbs
    add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' );
    function sp_breadcrumb_args( $args ) {
    	$args['home'] = 'Home';
    	$args['sep'] = ' - ';
    	$args['list_sep'] = ', '; // Genesis 1.5 and later
    	$args['prefix'] = '<div class="breadcrumb">';
    	$args['suffix'] = '</div>';
    	$args['heirarchial_attachments'] = true; // Genesis 1.5 and later
    	$args['heirarchial_categories'] = true; // Genesis 1.5 and later
    	$args['display'] = true;
    	$args['labels']['prefix'] = 'SEI in: ';
    	$args['labels']['author'] = '';
    	$args['labels']['category'] = ' '; // Genesis 1.6 and later
    	$args['labels']['tag'] = '';
    	$args['labels']['date'] = '';
    	$args['labels']['search'] = 'Ricerca per ';
    	$args['labels']['tax'] = '';
    	$args['labels']['post_type'] = '';
    	$args['labels']['404'] = 'Non trovato: '; // Genesis 1.5 and later
    return $args;
    }
    
    //* Modifica lascia un commento
    add_filter( 'genesis_post_info', 'sp_post_info_filter' );
    function sp_post_info_filter( $post_info ) {
    	return '[post_date] di <span style="color: #f1c8b2">[post_author]</span> [post_comments zero="scrivi un commento" one="1 Comment" more="% Comments"]';
    }
    
    //* modifica label da Commenta a MESSAGGIO
    function modify_comment_form_text_area($arg) {
        $arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'MESSAGGIO', 'noun' ) . '</label><textarea id="comment" name="comment" cols="25" rows="10" aria-required="true"></textarea></p>
    <p style="text-align: right; font-size: 12px;">I commenti inviati saranno moderati prima di essere pubblicati.</p>';
        return $arg;
    }
    add_filter('comment_form_defaults', 'modify_comment_form_text_area');
    
    add_filter( 'genesis_noposts_text', 'change_noposts_text' );
    function change_noposts_text( $text ) {
    	$text = __( '<p style="text-align:center">in cammino ;-)...</p>', 'genesis' );
    	return $text;
    }
    
    add_filter( 'genesis_comment_list_args', 'my_custom_comment_callback' );
    function my_custom_comment_callback( $defaults ) {
    
        $defaults['callback'] = genesis_html5() ? 'my_html5_comment_callback' : 'genesis_comment_callback';
        return $defaults;
    }
    
    function my_html5_comment_callback( $comment, array $args, $depth ) {
        $GLOBALS['comment'] = $comment; ?>
    
    	<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
    	<article <?php echo genesis_attr( 'comment' ); ?>>
    
    		<?php do_action( 'genesis_before_comment' ); ?>
    
    		<header <?php echo genesis_attr( 'comment-header' ); ?>>
    			<p <?php echo genesis_attr( 'comment-author' ); ?>>
    				<?php
    				echo get_avatar( $comment, $args['avatar_size'] );
    
    				$author = get_comment_author();
    				$url    = get_comment_author_url();
    
    				if ( ! empty( $url ) && 'http://' !== $url ) {
    					$author = sprintf( '<a href="%s" %s>%s</a>', esc_url( $url ), genesis_attr( 'comment-author-link' ), $author );
    				}
    
    				/**
    				 * Filter the "comment author says" text.
    				 *
    				 * Allows developer to filter the "comment author says" text so it can say something different, or nothing at all.
    				 *
    				 * @since unknown
    				 *
    				 * @param string $text Comment author says text.
    				 */
    				$comment_author_says_text = apply_filters( 'comment_author_says_text', __( 'says', 'genesis' ) );
    
    				if ( ! empty( $comment_author_says_text ) ) {
    					$comment_author_says_text = '<span class="says">' . $comment_author_says_text . '</span>';
    				}
    
    				printf( '<span itemprop="name">%s</span> %s', $author, $comment_author_says_text );
    				?>
    			</p>
    
    			<?php
    			/**
    			 * Allows developer to control whether to print the comment date.
    			 *
    			 * @since 2.2.0
    			 *
    			 * @param bool   $comment_date Whether to print the comment date.
    			 * @param string $post_type    The current post type.
    			 */
    			$comment_date = apply_filters( 'genesis_show_comment_date', true, get_post_type() );
    
    			if ( $comment_date ) {
    				printf( '<p %s>', genesis_attr( 'comment-meta' ) );
    				printf( '<time %s>', genesis_attr( 'comment-time' ) );
    				printf( '<a href="%s" %s>', esc_url( get_comment_link( $comment->comment_ID ) ), genesis_attr( 'comment-time-link' ) );
    				echo    esc_html( get_comment_date() );
    				echo    '</a></time></p>';
    			}
    
    			edit_comment_link( __( '(Edit)', 'genesis' ), ' ' );
    			?>
    		</header>
    
    		<div <?php echo genesis_attr( 'comment-content' ); ?>>
    			<?php if ( ! $comment->comment_approved ) : ?>
    				<?php
    				/**
    				 * Filter the "comment awaiting moderation" text.
    				 *
    				 * Allows developer to filter the "comment awaiting moderation" text so it can say something different, or nothing at all.
    				 *
    				 * @since unknown
    				 *
    				 * @param string $text Comment awaiting moderation text.
    				 */
    				$comment_awaiting_moderation_text = apply_filters( 'genesis_comment_awaiting_moderation', __( 'Your comment is awaiting moderation.', 'genesis' ) );
    				?>
    				<p class="alert"><?php echo $comment_awaiting_moderation_text; ?></p>
    			<?php endif; ?>
    
    			<?php comment_text(); ?>
    		</div>
    
    		<?php
    		comment_reply_link( array_merge( $args, array(
    			'depth'  => $depth,
    			'before' => sprintf( '<div %s>', genesis_attr( 'comment-reply' ) ),
    			'after'  => '</div>',
    		) ) );
    		?>
    
    		<?php do_action( 'genesis_after_comment' ); ?>
    
    	</article>
    	<?php
    	// No ending </li> tag because of comment threading.
    }
    
    add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );
    
    remove_action( 'genesis_after_entry', 'genesis_adjacent_entry_nav' );
    add_action( 'genesis_entry_footer', 'my_custom_prev_next_post_nav' );
    /**
     * my_custom_prev_next_post_nav
     *
     * @since 1.0.0
     *
     * @return void
     */
    function my_custom_prev_next_post_nav () {
    
    	if ( ! is_singular() || ! post_type_supports( get_post_type(), 'genesis-adjacent-entry-nav' ) ) {
    		return;
    	}
    
    	genesis_markup( array(
    		'open'    => '<div %s>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    
    	echo '<div class="pagination-previous alignleft">';
    	previous_post_link( '%link', '&laquo; Previous Page' );
    	echo '</div>';
    
    	echo '<div class="pagination-next alignright">';
    	next_post_link( '%link', 'Next Page &raquo;' );
    	echo '</div>';
    
    	genesis_markup( array(
    		'close'    => '</div>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    }

    but it does not work.

    May 27, 2017 at 11:15 pm #207082
    famarinu
    Member

    I use the lifestyle theme

    May 28, 2017 at 6:10 am #207089
    Victor Font
    Moderator

    This line is incorrect:

    add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );

    The instructions for this function say:

    Helper function to display adjacent entry navigation on single posts. Must be hooked to genesis_after_entry at priority 10 or earlier to work properly

    genesis_entry_footer is the wrong place to call genesis_prev_next_post_nav. Besides, the only thing this helper function does is add_post_type_support( 'post', 'genesis-adjacent-entry-nav' );

    Instead of the add_actions and remove actions, all you really need is one line of code:

    add_post_type_support( 'post', 'my_custom_prev_next_post_nav' );

    Then change this part of the function:

    post_type_supports( get_post_type(), 'genesis-adjacent-entry-nav' )

    to this

    post_type_supports( get_post_type(), 'my_custom_prev_next_post_nav' )


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 28, 2017 at 8:46 am #207094
    famarinu
    Member

    I change this:

    add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );
    
    remove_action( 'genesis_after_entry', 'genesis_adjacent_entry_nav' );
    add_action( 'genesis_entry_footer', 'my_custom_prev_next_post_nav' );
    /**
     * my_custom_prev_next_post_nav
     *
     * @since 1.0.0
     *
     * @return void
     */
    function my_custom_prev_next_post_nav () {
    
    	if ( ! is_singular() || ! post_type_supports( get_post_type(), 'genesis-adjacent-entry-nav' ) ) {
    		return;
    	}
    
    	genesis_markup( array(
    		'open'    => '<div %s>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    
    	echo '<div class="pagination-previous alignleft">';
    	previous_post_link( '%link', '&laquo; Previous Page' );
    	echo '</div>';
    
    	echo '<div class="pagination-next alignright">';
    	next_post_link( '%link', 'Next Page &raquo;' );
    	echo '</div>';
    
    	genesis_markup( array(
    		'close'    => '</div>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    }

    In:

    add_post_type_support( 'post', 'my_custom_prev_next_post_nav' );
    /**
     * my_custom_prev_next_post_nav
     *
     * @since 1.0.0
     *
     * @return void
     */
    function my_custom_prev_next_post_nav () {
    
    	if ( ! is_singular() || ! post_type_supports( get_post_type(), 'my_custom_prev_next_post_nav' ) ) {
    		return;
    	}
    
    	genesis_markup( array(
    		'open'    => '<div %s>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    
    	echo '<div class="pagination-previous alignleft">';
    	previous_post_link( '%link', '&laquo; Previous Page' );
    	echo '</div>';
    
    	echo '<div class="pagination-next alignright">';
    	next_post_link( '%link', 'Next Page &raquo;' );
    	echo '</div>';
    
    	genesis_markup( array(
    		'close'    => '</div>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    }

    But it not work, what I do?

    May 28, 2017 at 1:18 pm #207102
    Victor Font
    Moderator

    This works:

    add_post_type_support( 'post', 'my-custom-prev-next-post-nav' );
    add_action( 'genesis_after_entry', 'my_custom_prev_next_post_nav' );
    
    function my_custom_prev_next_post_nav() {
    if ( ! is_singular() || ! post_type_supports( get_post_type(), 'my-custom-prev-next-post-nav' ) ) {
    		return;
    	}
    
    	genesis_markup( array(
    		'open'    => '<div %s>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    
    	echo '<div class="pagination-previous alignleft">';
    	previous_post_link( '%link', '&laquo; Previous Page' );
    	echo '</div>';
    
    	echo '<div class="pagination-next alignright">';
    	next_post_link( '%link', 'Next Page &raquo;' );
    	echo '</div>';
    
    	genesis_markup( array(
    		'close'    => '</div>',
    		'context' => 'adjacent-entry-pagination',
    	) );
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 28, 2017 at 9:35 pm #207111
    famarinu
    Member

    Yes, now it works.
    I would also like it in the home and in the archives.
    Thank you!

    May 29, 2017 at 6:23 am #207122
    Victor Font
    Moderator

    I'll give you a hint: https://codex.wordpress.org/Function_Reference/is_singular


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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