Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Christoph

    (@camthor)

    I checked your link and the Surprise Me! menu seems to redirect to a random post (recipe). This is possible with this plugin.

    I’m not sure what you mean by “on the same page”? Posts and pages are different things, and in your example you seem to use only posts. You can simply install this plugin and try the example for a random link.

    Thread Starter belgirlinaz

    (@belgirlinaz)

    Thanks for the response. So I did try it, but it takes me to a new post page instead of reloading a different post on the same page. So on my home page, I have a section that is showing a post. (image, title, post excerpt) When they hit the “Surprise Me” button I want to load a different post in that section without going to the complete URL. Does that make sense?

    Plugin Author Christoph

    (@camthor)

    Currently, when I click on that menu on the front page, it takes me, for example, to
    https://smittenkitchen.com/2015/03/wild-mushroom-pate/ (which is a post, no page)
    next time to
    https://smittenkitchen.com/2010/04/cabbage-and-lime-salad-with-roasted-peanuts/ (which again is a post, no page)

    So I cannot see that your current solution reloads a post “on the same page”. It’s always a different post with its own URL, and no page involved (of course, the theme/design is the same for all posts). Here is an example for a page: https://smittenkitchen.com/books/ (there’s no date in the URL).

    Or do you mean that it sometimes opens a new tab in the browser? When I try, it’s always in the same tab.

    On your front/home page there is a list of posts. Do you want to reshuffle their order randomly, but still show posts as a list? If it’s that what you need, this plugin cannot help. This link could give a hint how to do it: https://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/

    If this is not what you need, could you paste two links, one of a “new post page” and one of “a different post on the same page”? Seeing a good and a bad example might help me understand.

    Thread Starter belgirlinaz

    (@belgirlinaz)

    On your front/home page there is a list of posts. Do you want to reshuffle their order randomly, but still show posts as a list?

    Yep that’s sorta what I wanted to do. I wanted to randomly load a new post in a certain section of my home page instead of redirecting to the post completely. Thanks for your response.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Keep redirect on same page?’ is closed to new replies.