How to map an arbitrary URL to a function in a Wordpress plugin -


i'm trying create wordpress plugin redirects visitors of example.com/redirect/xxx different page based on value of xxx. think know how redirect logic, don't know how make sure wordpress plugin function called when visitor goes example.com/redirect. right 404. there other solutions involved changing .htaccess file, want function standalone plugin. thanks!

when need kind of things create common page template "plugin", page functions need.

for example, if need shopping cart, create cart.php as:

<?php /* template name: cart */ // functions here ?> 

and go wp-admin , create page cart template.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -