URL rewrite with add_rewrite_rule and attachment_id
I’m trying to add a rewrite rule to make this:
I’m trying to add a rewrite rule to make this:
Using two permalinks for one post I am developing a wordpress website for a client, the client want to show 2 separate templaes for post details the scenario will be. user clicks on post and our default single.php will load up, there have a play button when user click on play button then instead of … Read more
I have custom post types for dining, lodging, and activities. Each of those custom post types uses a custom taxonomy called region. If, for example, I have a region called “downtown”, I would like to be able to show dining option for that region by going to domain.com/downtown/dining. Or show hotels in that region by going to domain.com/downtown/lodging. So, basically, I like to create a rewrite rule to give the structure domain.com/tax-term/cpt-slug to show all the posts for the cpt that have that tax term selected. Any way to do this?
i’m just about to release a community plug-in and have a few last anoying issues.
I am trying to get add_rewrite_rule working to extract a param from url and pass it through to the request. Seen a number of posts about this, but can’t seem to get it working.
I’ve spent a few days trying to learn how to best add rewrite rules. So far my understanding is that a suitable way to add simple rules is to use add_rewrite_rules(), with large thanks to Jan Fabry on this exchange who’s elaborations have been of great use.
I’m creating a plugin that has a view in front-end and i have a link in home page to access it:
/wp-content/plugins/wp-test-plugin/public/partials/wp-test-plugin-public-display.php.
I’ve written Rewrite rules for my custom post types. they work well except that WP doesn’t update the url in the User Agent when the redirect_url doesn’t match the requested_url.
If you have a category called “term” and a subcategory called “subterm”, your can access subterm posts at /cat/subcat. But this doesn’t work out of the box with custom taxonomies. They are accessible at /taxonomy/subterm, but not /taxonomy/term/subterm.
I have a custom post type of players, and archive-players.php lists them all at an address such as www.site.com/players.