Rewrite rules modify a web URL's appearance. This modification is called URL rewriting. Rewritten URLs (sometimes known as short, fancy URLs, search engine friendly - SEF URLs, or slugs) are used to provide shorter and more relevant-looking links to web pages. The technique adds a layer of ...

learn more… | top users | synonyms

1
vote
1answer
10 views

How to check if a rewrite rule exists

A common problem with rewrite rules added in a theme is that there is no obvious hook on which you can flush the rewrite rules. The problem is getting harder when you update a theme with new code that ...
0
votes
0answers
10 views

Need help with rewrite for an archive page under a specific category

I have two CPTs, cartoon-series and episodes. I have one taxonomy, cartoon-series which is used to link the two CPTs together (long story - other threads for a complex issue). I have rewrites that ...
0
votes
1answer
32 views

Need help with complex custom post type setup

I have three custom post types: cartoon-series, episodes, and special-features. Right now I have cartoon-series posts set to be post-parents of episodes and special-features posts. That's the only ...
0
votes
1answer
27 views

Custom Post Type won't Register

I'm hoping one of you WP gurus can spot what I am missing. I have a CPT that won't register for some reason. It' virtually identical to another CPT that is registered just fine. I have a custom post ...
0
votes
0answers
16 views

Pass tax_query variables in URL

I'm trying to create some URLs rewrite for my site, but now I'm stuck. I have this structure in my permalinks: example.com/%custom-type%/%category%/%postname% The full URL is already working: ...
0
votes
0answers
14 views

Rewrite for custom type and custom taxonomy

Hello I created a custom post type using the Types Plugin, this custom type has the slug menu, and my permalink structure looks like that: example.com/%custom-type%/%category%/%postname% ...
-1
votes
3answers
101 views

WP Job Manger change jobs url (NOT slug)

I'm using the WP Job Manager plugin in my wordpress website. The list of my jobs is currently found on /jobs . I would like to have it on /careers . The listing of all jobs is not a page so I can't ...
0
votes
0answers
11 views

Custom rewrite rule returns post instead of (start)page

I need a custom rewrite rule so that /a/b/c/d/123 points to the startpage because my own plugin on the startpage needs those parameters from the URL. / I was able to accomplish most of ...
0
votes
1answer
43 views

Nginx rewrite rule conflict with WordPress permalinks rule

Facing issue with nginx url rewrite rules. What I want is to serve http://example.com/2015/03/23/post-title/ page when someone tries to access http://example.com/2015/03/23/myfeed/post-title/ url. And ...
0
votes
0answers
9 views

Rewriting top level URL to point to custom taxonomy in addition to pages and categories

I need the top level URL on a blog to point to custom taxonomy, in addition to categories and pages which are the default. For example, currently if a visitor goes to example.com/entertainment, ...
0
votes
0answers
27 views

URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”

I have created a custom user meta = shop_name in User Profile and custom post type gallery The default URL of the post is http://localhost/gallery/%gallery% which i have modified to below given URL ...
3
votes
1answer
30 views

Change page /2 to /transcript with a Rewrite

I set up this rule (in functions.php) function custom_rewrite_basic() { add_rewrite_rule( 'episode/([^/]+)/transcript', ...
0
votes
1answer
38 views

Wordpress Custom post type single page 404 error

I have a wordpress website where I am using custom post types. I have an error on all single custom post type pages of one of the custom post type called products registered as portfolio. If I refresh ...
0
votes
1answer
17 views

Using category slug in add_rewrite rule

I'm using this function ro rewrite URLs: function archive_rewrite_rules(){ add_rewrite_rule( 'inspiracao/([^/]*)/([0-9]{4})/?$', ...
0
votes
3answers
44 views

Rewrite URL in address bar for a specific page [closed]

My client has purchased a new "vanity" domain name that they want to use to forward peoplle to a specific page I've set up on their wordpress site. I've set up web forwarding on the new domain so ...
0
votes
0answers
23 views

Rewrite rules with htpasswd doesn't work

I am trying to set a password for my wp-login.php page using .htpasswds, it works without adding wordpress rewriting rules <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ...
1
vote
0answers
21 views

rewrite taxonomy-{taxonomy}-{term}.php terms

I try to figure out a rewrite problem, that is a somewhat over my head, so i ask here to find out what i can do. I use this two solutions from Jeff 1 and Milo 2, to get a full-path url for my custom ...
0
votes
0answers
16 views

How to prefix all rewrite rules in wordpress?

I want to prefix all permalinks in wordpress, and get this value from query_args. For example http://wp.dev/sample-page transform in http://wp.dev/en/sample-page. I want for all permalink, for page ...
0
votes
1answer
29 views

How do I turn off the blog and archives?

Is there a fixed set of htaccess rewrite rules I can use to "turn off" everything blogging related? It's not enough to just not show the links in the menu, I want to completely hide everything ...
2
votes
0answers
50 views

Rewrite rule page url with category

I have enabled the category box for pages with this: // Add to the admin_init hook of your theme functions.php file add_action( 'admin_init', 'page_categories' ); function page_categories() { // ...
0
votes
0answers
28 views

RewriteRule directive not working without [P] flag

I need to rewrite some URL's, but I ran into strange problem. For some reason RewriteRule directive only works if I use proxy flag, for example: RewriteRule ^foo$ /www_dev/test/page2-2/ [P] works as ...
0
votes
0answers
35 views

rewire rule for custom taxonomy of custom post type

So I have spent almost a week trying to solve this problem, I have a custom post type called Product with a custom taxonomy called Category. What I want is be able to list all products in a category ...
0
votes
0answers
29 views

add_rewrite Rule

I want to add a rewrite rule, the remove the "base" from a custom taxonomy link. There current structure is: http://example.com/bundesland/TERMSLUG I would like to have it like this: ...
0
votes
0answers
21 views

Remove rewrite path for custom taxonomy [duplicate]

I want to get rid of the rewrite path for a custom taxonomy. This is the way, I register it: register_taxonomy( 'bl_tax', array( 'stadt'), array( 'label' ...
0
votes
1answer
31 views

How bad is flush_rules() on init hook?

According to the Codex: [...] This function can be extremely costly in terms of performance. It should be used as sparingly as possible - such as during activation or deactivation of plugins or ...
0
votes
1answer
79 views

How to check if last uri segment is a custom post type or taxonomy term?

After following Jeffs suggestion on this thread to create nested parent and child taxonomy terms within a permalink like... url.com/custom-post-type/taxonomy-parent/taxonomy-child/cpt-entry It ...
0
votes
0answers
46 views

Custom Post Type with Rewrite Rule and Paging

I am running WordPress 4.0 and I have created a custom post type called events-to-see which is a post. I wanted to get the events to display with the following url structure ...
0
votes
0answers
64 views

How to completely overwrite and replace the permalink rewrite rules?

The site I'm working on has a very specific permalink structure, one that is very different from the default wordpress permalinks. I don't want to add rules; I want to replace the rules entirely with ...
0
votes
0answers
42 views

Ignore specific URI segment

I've set up a custom post type and have it displaying correctly at /archive and /archive/single - what I want to be able to do is allow specific segments in place of /single to still show the ...
0
votes
0answers
21 views

Custom rewrite rules without a sub folder path to identify clash with pages

I need to be able to have routes to links that are both pages and products from the main wordpress root directory, without anything to distinguish between what a product (which is a template_redirect) ...
0
votes
1answer
99 views

Add a query string to ALL links on site

Our client would like to embed his site into an iframe in their software backend. I get a query string on the first link but need to make sure that string persists across URLs for all links and ...
0
votes
1answer
37 views

If term and page have the same slug, how can I view the term archive?

I am using a custom taxonomy with the term slug 'nursery'. I'm also using a page with the slug 'nursery'. I can view the page fine, but trying to view the 'nursery' term archive page as fetched by ...
0
votes
1answer
71 views

Custom rewrite rules are sending everything to index.php

I'm creating a site where users work together on teams to create films. Currently, I'm setting up an edit page on the front end for team managers. I've just got a simple isset() check on a query var ...
0
votes
1answer
46 views

Rewrite rules and query for virtual page

My question comes from this one. I have never really touched on rewrite rules as frankly, they still do not make sense to me What I have I have successfully build the following link ...
0
votes
1answer
21 views

How can you create a Permalink structure on a WordPress site?

Let's say I want to create a wordpress site that has a folder structure such as: http://www.example.com/cars/ http://www.example.com/cars/red-cars/ Yet I want people to be able to comment on both ...
0
votes
1answer
24 views

WordPress doesn't remember my custom rewrite rule

I have the following code: function b09_custom_rewrite_rule() { add_rewrite_rule( 'utils/([^/]+)/?', 'index.php?utils=$matches[1]', 'top' ); flush_rewrite_rules(); } ...
0
votes
1answer
77 views

Using two permalinks for one post

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 ...
0
votes
1answer
142 views

How to Add Pages Under Custom Post Type URL Structure?

How can I add pages under the URL structure of a Custom Post Type? For example... If I had a Custom Post Type called "Knowledge Base" ... Located at: domain.com/knowledge-base/ ... and I wanted to ...
1
vote
0answers
99 views

Pretty permalinks IIS gives 404 on posts/pages

I'm trying to get Wordpress to work under IIS and I've gotten stuck on custom permalinks. If I use the standard ugly permalinks, All standard features works fine, but plugins like Buddypress does ...
0
votes
1answer
25 views

Custom urls in WordPress involving page slugs

I have a page called 'Cars' with slug cars. Is it possible that the page works as normal at this URL http://example.com/cars/ and http://example.com/cars/audi/ can be used to show something some ...
0
votes
0answers
65 views

Loading different template on different url of same page

I have successfully add rewrite rule and tag for a page. My page slug is my-page. when my url is mysite.com/my-page then the right template is properly loaded. I have set a custom template for ...
1
vote
1answer
19 views

Best action to call add_rewrite_rule

In Codex I found that the best action to call add_rewrite_rule is the init action. So in this way the function is called every time the site load. But to save the rule in rewrite_rules option it would ...
0
votes
0answers
53 views

How to get list of taxonomy slugs ordered parents>childs?

Is there an existing function in WordPress to generate a list of taxonomy slugs ordered by parents > childs > subchilds in an array? I need to generate a URL structure for my custom post type in ...
0
votes
0answers
24 views

Attempting to modify cpt archive with query var

I have a custom post type, messages (slug is watch), and I added a query var, speaker, as well as the rewrite. If the url is /watch/speaker/Speaker+Name it modifies the query to include that. If it's ...
0
votes
1answer
39 views

Add Custom Pagination Permalink

I'm trying to create a page with multiple loops on it and as such also need multiple pagination. This is proving to be a touch difficult, I've managed to get the links to show correctly by using the ...
1
vote
1answer
25 views

Custom post type permalink returns 404

Mates, I've created a custom post type. Created some posts of that type, but when I try to access to any of them, I get 404 error. Also created single theme (single-pb_progproy.php). Here's the ...
0
votes
0answers
34 views

PHP Rewrite Wordpress Folder to act as query string variable throughout site

I'm hoping in this is a possibility with Wordpress and I have been researching this for hours online and I'm not find a definitive or simple working example of how to achieve my goal. I need ...
0
votes
0answers
15 views

rewrite rule of post when accessed from archives pages

Im trying to rewrite the slug of the permalink of my post when accessed from my archives pages. at the moment it display like: www.mydomain.com/categorypost/post_title id like instead ...
0
votes
1answer
26 views

Multiple Custom Post Type permalink issue

I have 2 Custom Post Type(Our Works and Case Study) in a WordPress site. If I add same postname(Pepsi) at my 2 Custom Post Type(Our Works and Case Study) the permalink will show given below: 1) ...
0
votes
0answers
18 views

Remove final slash from url

I created rewrite this rule: public function manage_user_routes() { add_rewrite_rule( '^user/([^/]+)?', 'index.php?control_action=$matches[1]', 'top' ); } but when I try to access ...