[Resolved] display prev/next post link within one line

Home Forums Support [Resolved] display prev/next post link within one line

Home Forums Support display prev/next post link within one line

  • This topic has 9 replies, 3 voices, and was last updated 1 year ago by David.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1489406
    Joyce

    Hi Team,

    This ticket is no 2 in https://generatepress.com/forums/topic/child-theme-12/, thanks.

    /inc/structure/post-meta.php
    – need to display prev/next post link within one line, so I added css class (prev-post-link,next-post-link)

    <'previous_format' => '<div class="nav-previous prev-post-link">' . generate_get_svg_icon( 'arrow-left' ) . '<span class="prev" title="' . esc_attr__( 'Previous', 'generatepress' ) . '">%link</span></div>'
    <'next_format' => '<div class="nav-next next-post-link">' . '<span class="next" title="' . esc_attr__( 'Next', 'generatepress' ) . '">%link</span>' . generate_get_svg_icon( 'arrow-right' ) . '</div>'
    next-post-link {
    	float: right;
    	font-weight: bold;
    }
    .prev-post-link {
    	display: inline;  //div do not break into new line
    	font-weight: bold;
    }
    #1489412
    Elvin
    Staff
    Customer Support

    Hi,

    Can you link us to the site in question so we could take a closer look?

    You can add the site details on the Private Information text box. Thank you.

    A wise man once said:
    "Have you cleared your cache?"

    #1492747
    Joyce

    Sorry for my late reply, pls refer to https://prnt.sc/v0zfom

    #1492875
    David
    Staff
    Customer Support

    Hi there,

    can you provide a link to your site where we can see the issue?

    You can share a link privately by adding it to the Private Information box.

    #1492920
    Joyce

    Thanks David, pls see the prev/next link above comments section, thanks

    #1492960
    David
    Staff
    Customer Support

    I am getting Access Denied when visiting that link

    #1493632
    Joyce

    Sorry David can you please try again.

    #1493888
    David
    Staff
    Customer Support

    Try adding this CSS:

    @media(min-width: 769px) {
        .post-navigation,
        .post-navigation > div  {
            display: flex;
        }
        .post-navigation > div {
            flex: 0 0 45%;
            margin-top: 1em;
        }
        .post-navigation > div:last-child {
            margin-left: auto;
            flex-direction: row-reverse;
        }
        .post-navigation .gp-icon {
            align-self: flex-start;
        }
    }
    #1493895
    Joyce

    Thanks David, it works file, you are a legend!

    #1493928
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.