How to get link to random post in button

Hi Vlad (or someone else? )

I def. need your help again :slight_smile:

As you can see here currently I have two arrows on my screen, one for the next post and one for the previous post. I want to make the ‘next post’ (volgende keuze in Dutch) link to a random post, and now it’s the same current order.

I’m using the plugin WP post navigation, but if you have any other solution feel free :slight_smile: I don’t know if it has anything to do with the theme itself, but I would really appreciate it when you can answer this.

Do you know the code to search for or similar like that?



Obviously, it has nothing to do with the theme since you’re talking about a plugin :slight_smile: And no, the built in navigation can’t work with random posts. What you can do is try having a go at get_posts. See here please.

Well I could always try haha!

Another question (yeah about the theme hehe), at this moment i’m unable to see the widgets which i place in the sidebar. Can you tell me what did I do wrong? Only sidebar with posts ofc :slight_smile: Not homepage and to be more exactly, also not on the page (hoe werkt het).

Don’t know what you did. I see you have some code changes on your site so you might have deleted the sidebar. Or you might have disabled it from the Customize > Blog options. Check your single.php file and see if you’ve removed get_sidebar from there.
As a rule of thumb, if something is working on our demo page then the issue is present on your site only.

I guess i deleted it somehhow when changing the theme. In blog options it’s still classic so the sidebar should appear.

Can you send me the code so i can add it to the single.php?

<?php if ( get_theme_mod(‘fullwidth_single’, 0) != 1 ) {

I have in my single.php , but don’t know if that’s correct ?


I just checked the files sidebar.php single.php and functions.php and they all seem fine to me, can you take a look on my website and tell me more about it?