Site logo

Archived topic

Next - Previous in one row?

19 replies · Started by Jiri on December 5, 2016

Viewing posts 1–15 of 20

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

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

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
}

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

You're very welcome :)

Hello,

Is it possible to have this with:

featured image instead of arrows in 2 column?

Thank you

Not too sure what you mean? Any examples?

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!

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

Any chance we can revisit this once 1.3.45 is released?

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

Shooting for Monday :)

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!

This archived topic is closed to new replies.