Viewing 3 replies - 1 through 3 (of 3 total)
  • RossMitchell

    (@rossmitchell)

    As you said, you created a loop.
    Instead you could:
    – if you are not already using a child theme, then change to using a child theme.
    – create a customised page template for you special page, in it examine the passed in parameter “catid”, and when it is not set then give it your default value, the rest of the page template is a straight copy of the original template.

    Thread Starter Jack

    (@moxie)

    I don’t think this is going to work. You see, it is not really a custom page. It is the same page, but because I pass a page specific variable I can make some things visible.

    You can check the actual page with and without that variable. I think that will make things clear. If someone reaches the page through Google without the variable, some information is missing:

    https://www.denormaalstezaak.nl/regionale-initiatieven/99vandrechtsteden/?regiocat=708

    necafasu

    (@necafasu)

    Why not create a function on where it will check if the current page ID is equal to the page that you want to have a variable. And if it does, check if the regiocat variable is set. if not, redirect the page with the regiocat variable. that way it wont have an infinite loop.

    • This reply was modified 7 years ago by necafasu.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect to same page but with variables’ is closed to new replies.