• Hey again,

    is there a way to only show the titel of the previous/next post or do you have to have previous/next activated?

    Or can you actually replace previous/next with arrows/chevrons to be left/right of the titel somehow? So pretty much what WP does just that your feature of staying in a category is there.

    Thank you very much! ??

    Christoph

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jo4nny8

    (@jo4nny8)

    Hi @blueskript

    The shortcode option takes the same options as the main nav so if you turn off the options to display anything other than the post title it will hide these on the front end.

    regarding the arrows like the WordPress default nav show in the site you attached, you can simply add this with some css as an ::after element of the H4 title.

    .wp-post-nav-shortcode h4 {
    position:relative;
    }
    .wp-post-nav-shortcode h4::after {
    position:absolute;
    right:0;
    margin-left:20px;
    content:">>";
    top:0;
    }

    That should get you part of the way?

    Thread Starter blueskript

    (@blueskript)

    Thank you for your fast response! ??

    “The shortcode option takes the same options as the main nav so if you turn off the options to display anything other than the post title it will hide these on the front end.” – you actually have no option to turn of previous and next in the main nav in your plugin.

    Thx for the code. I tried it but it is only partly working… as i am not a coder i don′t really now if i′ll get it to wok. I will have look to see if i can find some guides for CSS.

    Thank you!

    Thread Starter blueskript

    (@blueskript)

    Hey, i was wondering, if i can target the previous/next shortcode in css seperate. Bause with the code you provided, for both the chevrons are displayed right. I would need them for previous to be displayed left.

    Thank you!

    Plugin Author Jo4nny8

    (@jo4nny8)

    @blueskript Yes you can target any specific element directly with css

    .wp-post-nav-shortcode h4 {
    position:relative;
    }
    .wp-post-nav-shortcode #post-nav-previous h4::after {
    position:absolute;
    left:0;
    margin-right:20px;
    content:"<<";
    top:0;
    }
    .wp-post-nav-shortcode #post-nav-next h4::after {
    position:absolute;
    right:0;
    margin-left:20px;
    content:">>";
    top:0;
    }
    

    Yuoll notice ive changed the positioning of each one so the previous (on the left) shows the arrows BEFORE the words and the next is on the right.

    Thread Starter blueskript

    (@blueskript)

    Cool! So i tried it and the left or right needs to be more than 0. Otherwise it will overlay with the text. So i put “left:1;” for example.

    The other problem is that the content of the “previous” code is still shown on the right side, even though the code defined it to be on the left :/

    Any idea how that can be changed?

    Plugin Author Jo4nny8

    (@jo4nny8)

    @blueskript cant see the issue on the link youve provided above. Can you add the code back in so I can check and confirm for you please

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide Previous/next’ is closed to new replies.