Support » Plugin: Redirect URL to Post » The button redirects to page

  • 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 Chris

    (@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 months ago by Chris. Reason: changed parameter name
    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.

    Nikonn

    (@nikonn)

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

    Plugin Author Chris

    (@camthor)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.