Random Blog Post generator not working

  • Author
    Posts
  • #3073471

    ryanriff
    Member
    Original poster

    I am trying to have some sort of random post button that will display a post or group of posts randomly so that my older posts can be seen. I’m trying to use the add HTML widget feature but all of the templates I’ve seen online have not worked. It keeps saying there are certain characters (like <) that can’t used. It ends up just showing as a giant block of text rather than any sort of button or code. I’m using the Canard template if that matters. Any advice on why it’s not working would be helpful.

    #3073581

    vaidehisingh
    Member

    Hi there,

    Can you please share your website? It will help us provide you the best possible solution.

    Looking forward to hearing from you.

    #3073582

    epoolman
    Staff

    Hi ryanriff.

    What I believe you are trying to add to the HTML widget is PHP and not HTML, that is why it won’t work and warns you about unrecognised characters.

    What you can do is add ?random behind your URL like this – https://riffreviews.wordpress.com/?random. That will open a random blog post.

    If you would like to make it a link, you can copy and paste this to the HTML widget and it will create a link that visitors can click on

    <a href="https://riffreviews.wordpress.com/?random">
    CLICK HERE FOR A RANDOM POST</a>

    You can change the CLICK HERE text to anything you want.

    Hope this helps.

    #3073585

    epoolman
    Staff

    To add to my post above, if you are on the Business Plan you have the ability to add plugins to your website. There are a couple of plugins available that can do that for you and show random blog posts.

    https://wordpress.com/plugins/advanced-random-posts-widget/

    https://wordpress.com/plugins/random-post-shortcode/

The topic ‘Random Blog Post generator not working’ is closed to new replies.