• Resolved Nikonn

    (@nikonn)


    Hello. I tried your plugin to redirect to a random page from the list and applied the shortcode – “redirect button”. I tried to compose the button code, but it didn’t work. Can you tell me where my mistake is? My button code is below:

    [redirect_to_post_button text="Choose a random page" redirect_to="random" post_type="page" params="page_id=20722,20755,20757,20759"]

    Thanks

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

    (@camthor)

    The correct formatting would be:

    [redirect_to_post_button text="Choose a random page" redirect_to="random" params="post_type=page|include=20722,20755,20757,20759"]

    I realize now that “include” doesn’t exist yet among the allowed parameters, so I will add it. “page_id” also doesn’t exist yet, and it would only allow for one ID.

    Edit: I will probably name it “include”, not “post__in”, for consistency with “exclude”.

    • This reply was modified 4 years, 5 months ago by Christoph. Reason: changed parameter name
    Thread Starter Nikonn

    (@nikonn)

    Thanks for the answer. Currently, your solution does not work, the reason is that it displays other pages with a different ID, but does not show pages with the listed ID. Do you have any other ideas? Thanks.

    Thread Starter Nikonn

    (@nikonn)

    Everything is great! Thanks! I just didn’t notice that there was a plugin update, after the update everything worked!

    Plugin Author Christoph

    (@camthor)

    Yes, I forgot to mention the update. I’m glad it works now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The button redirects to page’ is closed to new replies.