Pass global variable from Page 1 to page 2 (Pagination)

Ultimately to keep it real simple, on a custom query page, I have a global variable that I pull from a previous page. When I go to page 2… the global variable is blank.

Page 1:

  • Define global variable.
  • Link to another page

Page 2:

  • When on page 2, i call global variable, it works fine
  • On this page 2, it is a custom query. When I go to page 2, the global variable is now blank. It seems the variables do not pass to pagination at all.

I have tried sessions with no luck.

Topic globals variables pagination Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.