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?
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!
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!
@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.
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?
@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