• im working on a plugin and i cant find a solution online for two issues im having:
    1. Passing arguments between pages – for example i have one page showing tickets from 3rd party API, by clicking a ticket, i want to redirect the user to the specific ticket page, problem is the only way i found to pass the ticket id is using POST or GET ( GET will require ugly url ).

    2. permanent plugin pages – when installing the plugin i create my main page lets call it dashboard, and all my other pages with dashboard as the parent.
    so my links will be dashboard/tickets but how can i keep it if the client change the page name ? i need to link those pages and i cant find a way to do it dynamically.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    There’s several mechanisms for storing values between requests for various pages by the same user. URL parameters (as you know), cookies, session variables, transients, user meta, other DB solutions. You cannot set cookies once content has been sent with PHP, but you can with javascript. Which option is best depends on the specifics of your situation.

    When you create plugin pages, store the issued ID in the options table. Access your pages dynamically by using their stored IDs instead of the slug.

    Thread Starter drhost

    (@drhost)

    i cant use any of the user meta and anything on db as im the end user is anonymous ( guest ) to wordpress.

    about the linking , you sir are a genious 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin pages issues’ is closed to new replies.