This topic has 5 replies, 5 voices, and was last updated 9 years by Abe.

  • Author
  • #29993
     nsb
    Participant

    How can I change the previous and next posts links on single post page so they are just normal links.

    The problems and reason I want to change is on desktop the links don’t stand out and on my iphone the links don’t show if title is long which is most of my posts. Also on iphone tapping links needs to be done twice. First time Safari options come up then need to tap again for link to work. I don’t want this I just want simple normal links, thanks.

    #30114
     Catalin
    Moderator

    Hello,

    Add this code in your function.php file from your child theme:

    COPY CODE
    
    
    
    function kleo_post_nav( $same_cat = false ) {
    	// Don't print empty markup if there's nowhere to navigate.
    	$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( $same_cat, '', true );
    	$next     = get_adjacent_post( $same_cat, '', false );
    
    	if ( ! $next && ! $previous ) {
    		return;
    	}
    	?>
    	
    	<nav class="pagination-sticky member-navigation" role="navigation">
    		<?php
    		if ( is_attachment() ) :
    			previous_post_link( '%link', __( '<span id="older-nav">Go to article</span>', 'kleo_framework' ) );
    		else :
                if ($previous) {
                    previous_post_link( '%link',  '<span id="older-nav"><span class="outter-title"><span class="entry-title">Prev</span>', $same_cat );
                }
                if ($next) {
    			    next_post_link( '%link', '<span id="newer-nav"><span class="outter-title"><span class="entry-title">Next</span>', $same_cat );
                }
            endif;
    		?>
    	</nav><!-- .navigation -->
    	
    	<?php
    }
    
    
    

    let me know if this helps.

    Thank you,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #32088
     gitaman
    Participant

    Hello!
    How can I change text links “Next Member” and “Previous Member”
    Thank you

    #33013
     Catalin
    Moderator

    See my answer above and you will need to change the text there in the code

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #33155
     amine
    Participant

    Ho to disable this feature to show on the left and right with arrow of the next “Previous member”?

    #34430
     Abe
    Keymaster

    Please add this CSS to disable navigation.

    COPY CODE
    
    .pagination-sticky {
        display: none;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?