i have Wp blog that need to receive a custom paramter on category page for filter the posts like my rule.
For example:
How can I get the myvar from URL? I tried a lot of examples on the web, but no one works for the category page.
Thanks!
i have Wp blog that need to receive a custom paramter on category page for filter the posts like my rule.
For example:
How can I get the myvar from URL? I tried a lot of examples on the web, but no one works for the category page.
Thanks!
You must be logged in to post a comment.
Solved using this code.
You could use this:
and to make sure, u could also put this code in any page to test it:
This is simply the $GET[] function in PHP.
I hope it helps, and for more info visit this website.
Take a look at this Q and how to inspect the global
$wp_query;
. Then just get the relevant part (everything explained in my A).