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

0
votes
0answers
121 views

Set $wp_rewrite->non_wp_rules inside a plugin

I am attempting to set non-wordpress rewrites inside of a plugin. My $wp_rewrite->rules are getting set properly, but the $wp_rewrite->non_wp_rules are not getting set at all when I ...
0
votes
1answer
87 views

Rewrite url / permalink for default archive - yearly / monthly

I want to change the structure of yearly/monthly archive URL of default post type 'post'. As we know be default the URLs are like: Default: http://wwww.domain.com/2013/09 but want them rewritten, ...
0
votes
1answer
332 views

.htaccess rewrite

I have created a custom post type called 'event' and added an event called London 2012. I want the following URL structure for a page: local.mysite.com/london-2012/speakers I have created a page ...
0
votes
3answers
2k views

How to enable hierarchical permalinks for hierarchical taxonomies

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 ...
1
vote
1answer
216 views

Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?

I've added a myvar/myvalue rewrite endpoint to EP_ALL which can be added to any URL of a WP installation and a WP plugin will act upon it. That part is cool but it doesn't work when the permalink ...
0
votes
1answer
88 views

How to use WP_rewrite?

I need to add the following rewrite commend to WordPress .htaccess file: RewriteRule ^read/([0-9]+)/?$ /read/?u=$1 [QSA,L] How to do this by a function? i.e., how to do it by use wp_rewrite in ...
0
votes
1answer
128 views

Permalink/Pagination issue: Category base name same as page name

I currently have a page called "Blog" (slug "blog"), which loads a index.php. All posts in index.php belong to only one post category. A sidebar on index.php contains category links (via ...
1
vote
0answers
123 views

Pretty URLs and custom post types

I've read the posts on WP SA on rewrites and custom post types, but I can't figure out why my search for 2 different post types isn't working. I'd like my URLS to become ...
0
votes
1answer
4k views

Custom page with variables in url. Nice url with add_rewrite_rule

Using WP3.1 I Have a custom page with a WP_Query and the query gets dynamic variables from the url. And i want safe variables and clean urls. Example: ...
0
votes
1answer
641 views

Passing value as hidden parameter to next page

I am trying to send value from one page to another page in WordPress as i do not want to repeat logic to fetch that value in other page. I am not very proficient in WordPress/PHP, if i have to do that ...
2
votes
2answers
275 views

Add rewrite endpoint to author page + pagination

I want to add a new endpoint to the author page, so that the URL looks like this: http://example.com/writer/username/articles So far, I have: Changed the author base Added a rewrite rule Setup ...
1
vote
1answer
39 views

How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?

In .htaccess, I have this: RewriteRule ^land/(.*) /?land=1&exper=$1 [QSA,L] which makes sth like this: domain.com/land/exper1 fill in the $_GET with $_GET['land'] = 1 and $_GET['exper'] = ...
1
vote
1answer
197 views

Why doesn't flush_rewrite_rules run on plugin activation?

I'm trying to flush rewrite rules in a plugin and it isn't working. I have to go to permalinks -> save in the admin panel for the rewrites to flush. Can anyone see why? class SpektrixPlugin { public ...
-1
votes
2answers
168 views

Custom url rewriting

I am struggling to create custom rewrite rules for wordpress. This is my url structure http://domain/cityprofile/?city=Sydney where city profile is a page template. Now i want to make this url ...
0
votes
1answer
43 views

Rewrite rules goes away

I have a strange issue. The custom rewrite rules are registered correctly in my plugin activation hook. But, if I go to the permalinks settings page and clic on "Save changes" I lost the rewrite rules ...
4
votes
3answers
491 views

How to add a custom URL placeholder to author archives?

I am working with a client who has a directory site that allows users to create accounts, then lists of items from the directory. Right now, whenever a user creates an account, she gets a profile URL ...
0
votes
0answers
16 views

Rewrite author_name to color [duplicate]

I'd like to rewrite author_name to color. So example.com/?author_name=blue would be example.com/?color=blue I searched for hours but can't find anything useful. Any ideas?
0
votes
0answers
56 views

Rewrite author_name

I need to rewrite author_name to cat. I searched for hours but can't find anything. I restrict the search results by author instead category because of the performance, it's much faster. For getting ...
0
votes
2answers
247 views

WordPress Rewrite rule is not working

I am trying to create a rewrite rule for one of my custom page and here is the rewrite rule function add_my_rule() { global $wp; $wp->add_query_var('name_state'); ...
2
votes
2answers
80 views

When is it a good idea to build a permalink structure from scratch?

Is it a good idea to design a permalink structure from scratch? The requirements to the structure are as follows: Pages to be referenced by their structure ...
1
vote
2answers
132 views

rewrite rule to redirect to the most recent date permalink

I've got an archive that's displayed using a URL on the form www.mysite.ex/mycpt and I need to make a rewrite rule for that URL which redirects to a permalink with the latest date archive, which is on ...
0
votes
0answers
93 views

Select good template with rewriting rules

After creating the sub page "China" of the parent page "Destinations", I add to it the "Destinations countries" template. Without any redirection, I can display the correct template at this url : ...
0
votes
0answers
394 views

Adding rewrite rules to Custom Post-type mixed with Taxonomy

I turn to you because I can not find any solution to my problem. I created 3 custom post types "Actualités", "Dossiers", "Vidéos" (I'm french :D) I created 1 taxonomy: "Thématiques" with the ...
0
votes
0answers
38 views

Custom site-wide url redirect

What would be the best way to go about this situation: I have a site that I want to allow other people to link to, but then keep their links maintained across the entire site. So say, if I was a ...
4
votes
1answer
173 views

Permalinks so that one custom post type appears to be a child of another, not working

Currently I have two post types, "products" and "products-data" they are separate post types; however, for all intents and purposes products-data is a child post of products. The relation is ...
3
votes
1answer
198 views

WordPress Custom URL Rewrites

I am trying to add a custom rewrite rule with a single variable to a specific page. The 'ugly' version is http://example.com/used-cars/car/?carname=name-of-car and the 'pretty' version I'm going for ...
0
votes
1answer
86 views

custom post type archive page has 404 error even though has_archive is true

I have an existing site that has a custom post type with no archive. It has been live for almost a year now. I am trying to change the custom post type to have an archive now. So I changed ...
1
vote
0answers
30 views

Specific routing for CPT

I'm developing site for art gallery. A have Artist CPT (internal name artsin_artist) which is defined in my functions.php like following: register_post_type('artsin_artist', array( 'labels' => ...
0
votes
1answer
73 views

What is the proper way implement a global $wp_rewrite?

The below code works correctly, but I don't know if it is proper coding. Can anyone confirm or comment on the code? add_action('init', 'news_rewrite'); function news_rewrite() { global ...
0
votes
0answers
48 views

“attachment” default rewrite rules disappeared!

something very strange is going on with a WP theme I'm developing. The set of default rewrite rules regarding attachments .+?/[^/]+/attachment/([^/]+)/?$ .+?/[^/]+/attachment/([^/]+)/trackback/?$ ...
0
votes
1answer
53 views

rewrite rules add a folder in the path

I have to do some url rewritting for custom post types. I have 2 custom post types: portfolios and locations. What I need to change is the url like this: current: ...
0
votes
0answers
115 views

Problem with my add_rewrite_rule

I have a rewrite rule that needs to allow me to add 1-3 variables to the end of a page, the variables are then accessed by a plugin using a shortcode. This is the base page: ...
1
vote
2answers
73 views

Wordpress Rewrite

I'm trying to get http://example.com/site/vendors/?u=abc to rewrite to http://example.com/site/vendors/abc but I can't for the life of me figure out how to get the url rewrites to work. /site/ is the ...
3
votes
0answers
417 views

How do I rename the wp-admin folder with the admin_url filter? [duplicate]

Possible Duplicate: Can I rename the wp-admin folder? I have applied some mod_rewrite rules to redirect /wp-admin to /my-admin - based on this tutorial. I also changed the admin url ...
0
votes
0answers
43 views

Custom Rewrite for Profiles

I'm currently trying to modify my rewrites to allow for an additional URL segment e.g. http://example.com/vendors/username/ by default WP allows for additional numeric segments but everything else ...
0
votes
1answer
49 views

Wordpress Custom Rewrite Rule

I have a custom page template to use for a wordpress page. I am trying to setup a custom rewrite rule but without success. I have a page at blog/book-page/, the display of this page depends on the ...
0
votes
1answer
138 views

Remove rewrite rules generated by plugin during deactivation‎

I have a simple plugin like the following add_action('generate_rewrite_rules', function ($wp_rewrite) { $wp_rewrite->rules = xxx + $wp_rewrite->rules; }); if (is_admin()) { ...
1
vote
0answers
98 views

Rewrites with hierarchical taxonomies in permalink

I am attempting to create a hierarchical list of products in WordPress 3.5.1. For example if the custom post type product was in the custom taxonomy Outdoor > Garden Tools > Hoses, these would ...
0
votes
0answers
22 views

Make only one CPT available by slug

I did a lot of research until I figured out how to remove the slug from a custom post type. I used the method described in this post here. So I have RewriteRule ^bereiche/(.+)$ /$1 [R=301] in my ...
1
vote
0answers
154 views

Move wp-content htacess

I notice that when I rename the wp-content and plugins folders http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content my multisite network htacess still references wp-content: see this ...
0
votes
0answers
15 views

Rewrite rules for using taxonomy term in custom post type URL [duplicate]

I'm trying to change the urls of single 'places' (a custom post type) to direct to /%taxonomy-term%/%place-name%/ instead of /place/%place-name%/ The below function changes the links correctly: ...
0
votes
0answers
55 views

htaccess problem not being able to overwrite previous rules

so guys, what i need to do is: whenever someone ask for this url: dev.site.com/noticias/id/tittle-for-the-news ( dev.site.com/noticias/([0-9]+)/([A-Za-z0-9-]+)/ ) it needs to get this: ...
0
votes
0answers
123 views

Multiple taxonomy (category) filters

I would like to add advanced filtration to my wp website. E.g.: - you can filter cars by "fuel type", "purpose", "color", "brand/make"... - I would like to get intersection of results in one page. ...
1
vote
1answer
150 views

Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect

I'm currently working on a file browser plugin which requires frontend editing capabilities for a registered user. For this scenario, I have registered some custom rewrite rules for my custom post ...
0
votes
1answer
47 views

Rewriting WordPress URLs

I've got a plugin which takes input through a GET request via a shortcode. The shortcode is placed on a page with the address /search, and the query used to execute this particular piece of the search ...
1
vote
1answer
2k views

How to Rewrite Wordpress URL for a Plugin

I am trying to build a Wordpress plugin here with a custom user admin area. What I would like to do is when the user adds /edit at the end of the page, it should open a page from my plugin. So for ...
0
votes
1answer
90 views

Rewrites rules disappear after a while

My Plugin I implemented a small plugin to be able to show events with a specific custom field in a special order. To have some nice permalinks I also used the add_rewrite_rule function to add those ...
0
votes
0answers
95 views

Custom Post Type and Rewrite Slug Not working for Archive page

I'm hoping someone can help me out. I asked this on Wordpress.org but figured no harm in asking here too. I read an article about using a custom plugin to create custom post types. So I did. ...
0
votes
0answers
25 views

Category View with rewrite url

Is it possible to send the parameters in the category link like site.com/category/slugname/2011/20/10 and rewrite the url as $wp_rewrite->rules = array_merge( ...
2
votes
1answer
167 views

Custom rewrite rule is not picked by Wordpress

I am trying to create a custom Rewrite URL something like function add_my_rule() { global $wp; $wp->add_query_var('state'); $wp->add_query_var('state_destination'); ...