I’m trying modify some urls (on a wordpress website) by adding a css ID at the end:

So for ex: www.mywebsite.com/test/?pa_gender=male

should become: www.mywebsite.com/test/?pa_gender=male#mycustomid

Basically what im looking for is all urls that start with:

/test/?pa_(.*)$

to get a css id at the end like this:

/test/?pa_(.*)$1#mycustomid

Any suggestions on how to achieve this? I guess it should be possible doing this with a custom php function?

Read more here: modify urls adding a css id at the end


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: