[Resolved] Next – Previous in one row?

Home Forums Support [Resolved] Next – Previous in one row?

Home Forums Support Next – Previous in one row?

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #251488
    Jiri

    Hi!

    Please, can you advice me, in which file can i change the bottom navigation between posts (previous – next)?
    With css i can put it in one row, but i would like to change the position of symbol “>”.
    Thanks in advance!

    Best regards Jiri

    #251628
    Tom
    Lead Developer
    Lead Developer
    #251643
    Jiri

    Hi Tom!

    Thanks for the link, but unfortunately this is not exactly, what i want.
    My idea was to have navigation like this:

    < PREVIOUS_POST || NEXT_POST >

    So i probably need to change css for these elements (display: inline;), but i need to change the corrensponding php file too?

    Best regards Jiri

    #251747
    Tom
    Lead Developer
    Lead Developer

    Something like this should do without needing to alter PHP:

    .nav-next .next:after {
        content: "\f105";
        font-family: FontAwesome;
        font-weight: normal;
        font-style: normal;
        display: inline-block;
        text-decoration: inherit;
        position: relative;
        margin-left: .6em;
        width: 13px;
        text-align: center;
    }
    
    .nav-next .next:before {
        display: none;
    }
    
    .nav-next, .nav-previous {
        display: inline;
    }
    
    .nav-previous {
        border-right: 1px solid #DDD;
        padding-right: 10px;
        margin-right: 5px
    }
    #251820
    Jiri

    Hi Tom!

    I’m really suprised, because i didn’t know it is possible to do this without php.
    Great job and amazing support!
    Thank you very much!

    Best regards Jiri

    #251821
    Tom
    Lead Developer
    Lead Developer

    You’re very welcome πŸ™‚

    #257717
    BarnaB

    Hello,

    Is it possible to have this with:

    featured image instead of arrows in 2 column?

    Thank you

    #257775
    Tom
    Lead Developer
    Lead Developer

    Not too sure what you mean? Any examples?

    #257789
    BarnaB

    Sure…cooked this up in Photoshop quickly πŸ™‚

    http://prnt.sc/dnwh65

    #257878
    Tom
    Lead Developer
    Lead Developer

    You would have to use custom programming: http://wordpress.stackexchange.com/questions/4107/showing-thumbnail-from-previous-and-next-posts

    This is the function you would need to copy to your child theme/custom plugin to make the adjustments: https://github.com/tomusborne/generatepress/blob/1.3.41/inc/template-tags.php#L57-L108

    #289679
    eduard sans

    Hi Tom, I’m also interested in adding thumbnails to previous and next post like you just did in the last reply but it just doesn’t work for me. I’m really new when it comes to php (so far i only know how to “copy and paste”) so could you please expand a little further with your explanation in how to do it?

    What is that i have to do with this code in your first link? where do i paste it and do i have to change anything?

    $prevPost = get_previous_post();
    $prevThumbnail = get_the_post_thumbnail( $prevPost->ID );
    previous_post_link( '%link', $prevThumbnail );

    Also, in your second link, do I have to copy and paste the highlighted area in the functions.php of my child theme?

    Thanks in advance!

    #289845
    Tom
    Lead Developer
    Lead Developer

    That function has actually changed quite a bit in the upcoming version.

    Any chance we can revisit this once 1.3.45 is released?

    #289872
    eduard sans

    Sure Tom, no rush. When is It gonna be moreless?

    #290012
    Tom
    Lead Developer
    Lead Developer

    Shooting for Monday πŸ™‚

    #291923
    eduard sans

    Hi again tom, got my generatepress and gp premium already updated, whenever you have time i’d appreciate if you could help me on this one ;). Thanks!

Viewing 15 posts - 1 through 15 (of 20 total)
  • The topic ‘Next – Previous in one row?’ is closed to new replies.