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
1answer
140 views

Virtual Page with Registration form

Working on a plugin, which is intended to provide a registration on front-end, to let users register. I am trying to create a Virtual page, which would display the form. Trying to create URL like ...
3
votes
2answers
475 views

Make post slug have priority over category slug

I have a wordpress site where the category base is stripped from the url. Now, when a category has a certain slug that's similar to a post slug, the category is shown. I would like to show the post ...
2
votes
1answer
192 views

Rewriting URLs in Wordpress

I am trying to solve a rewrite problem but don't fully understand how to read the below code. I believe the event/industry/(.+)/?$' is stating the format I want in my new url after rewritten, which ...
1
vote
1answer
316 views

ReWriteRules and WordPress Multi-Sites with Sub Directories

I'm having a diffucult time getting the ReWriteRules and URL structures setup for a Wordpress 3.4.2 (latest version as of this post) blog with multi-site enabled. www.ourdomain.com/ is the homepage ...
0
votes
2answers
252 views

How do I make WordPress revise an .htaccess file a certain way?

I've learned just a slight bit with WordPress Rewrite API -- just enough to add another rewrite rule for a plugin. The plugin works if installed in the root, but I'm finding that if one installs ...
0
votes
1answer
373 views

Tricky URL rewrite with custom values in url

We have custom post type as user_images and each of these post has a image attached with image name is 3 digit number followed by extension. When the url http://mysite.com/wp_username/3digitnumber ...
4
votes
1answer
188 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 ...
1
vote
1answer
97 views

How to Create a Custom Slug for Tags and Categories with a prefix or suffix?

I wanted to rename the slug to use a custom rewrite with a prefix or suffix that I choose. For example, if the tag name is "product" I want to use a rewrite with a slug that says ...
0
votes
1answer
498 views

Custom url structure - pages under a custom post type

I'm struggling with the structure of my Wordpress site and I was hoping you might be able to give me some advice. The site is for a series of events and the structure is as follows: Gateway ...
13
votes
1answer
3k views

When should add_rewrite_tag() be used?

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

Custom post rewrite rule not working

I'm adding a custom post type like so (names have been altered to protect the innocent): add_action('init', 'my_post_types'); function my_post_types() { register_post_type('publication', ...
1
vote
0answers
127 views

404 (category, pages, archives) when using custom rewrite rules

I'm using www.domain.com/%POSTNAME%/CAR permalink structure (CAR is the variable i need to extract. After adding the code to the functions.php the other wordpress url's stopped working (category, ...
2
votes
1answer
229 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'); ...
1
vote
0answers
105 views

URL Rewrite with Custom Variables

I right now have a custom post type with a url structure like: example.com/videos/taxonomyname/ I have a custom variable that I am detecting in the template file to switch layout views which works ...
0
votes
1answer
534 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 ...
1
vote
1answer
3k 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 ...
1
vote
1answer
212 views

Re-write specific custom post type category URL to go to another page

I know this general question has been asked before (like here and here), but the problem is with my limited experience, I cannot get the results I need looking at other people's code. So here's my ...
1
vote
1answer
294 views

How does WP handle multiple matching rewrite rules?

Here is my url to a custom type : http://host/movie/my-slug When I go to this link, I'm redirected to http://host/movie/my-slug/?post_type=movie which results in a 404 error. I use Rewrite ...
2
votes
2answers
4k views

How to modify URL structures in custom post types and taxonomies or terms

I am well aware that there are several posts covering the topic of customizing the permalink URL structure of custom post types, custom taxonomies, and taxonomy terms. However, none of them are real ...
0
votes
1answer
108 views

Rename page URL

I have the following URL structure: http://localhost/wordpress/gallery?id=331 id specifies the id of the post. gallery is a normal page inside which I am accessing the id of the post and fetching ...
2
votes
1answer
164 views

How to debug removal of rewrite rule flushing?

I use Custom Post Types. I try this: functions.php add_action( 'admin_init', 'flush_rewrite_rules' ); Now I’d like to remove this again. I try this: remove_action( 'admin_init', ...
0
votes
1answer
184 views

Subpages Permalinks Issues

my site looks like: Page-1 (page.php) ... Subpage-1 (custom-collection.php; Custom Post Type) ...... Filtering Output-Post (custom-collection-single.php) When I open the filtering output-post by ...
0
votes
1answer
40 views

Rewrite rules applied differently after upgrade

After WP upgrade from 3.2.1 to 3.4.1 I faced the problem that rules are not applied same way. I have the following rule: (questions-answers)/([mind|nutrition|fitness|beauty]*)[/page/]*(\d*)$ In WP ...
0
votes
1answer
122 views

Rewrite rule to redirect to a particular filename.php

I'm using the Monkeyman Rewrite Analyzer plugin (http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/) I want to write a rule that will be take a URL (that is specified in the user's accnt ...
1
vote
1answer
717 views

Disable wordpress pagination URL rewrite for specific page

I'm hoping somebody could help me out with the following issue. I have a wordpress page: http://www.howdesign.com/design-jobs and there is a list of jobs coming from behance.net via JavaScript. When ...
0
votes
1answer
592 views

Multiple parameters in a custom post type url rewrite

I have a custom post type called venues currently they display through the url format: http://mywebsite.com/venue/{venue-name} I would like to have the format: ...
1
vote
1answer
481 views

Force a specific template based on the URL

When a user browses to a URI beginning with "/forums", WordPress should call a specified template. For example, all of these URLs: mysite.com/forums mysite.com/forums/questions ...
1
vote
0answers
34 views

Permalinks only for posts

I would like to use wordpress permalinks but only for posts. Is there any way to do that? I don't care about seo, my website is about niche subject so it already has first position in google. Also ...
1
vote
1answer
117 views

Rewrite rules for varying nested terms of custom taxonomy

I've searched the net an the only working solution to this seems to be this post by Jeff which does everything except handle nested terms. Does anybody know how to change the rewrite based on the ...
-1
votes
1answer
248 views

Wordpress custom taxonomy page

I've got a question that I've seen being asked before, but none of the answers solved my problems. It's something I've run into before, but never managed to solve. I've got a clean Wordpress ...
0
votes
1answer
303 views

Redirect old query string urls to new SEO urls

I had urls like example.com/?area=new-york. area is a custom taxonomy. I had to change the urls to example.com/new-york. I want to do a 301 to new urls if previous urls are accessed. and I want Google ...
2
votes
1answer
643 views

How to achieve this permalink -> category-name/custom-post-type-name/post-name

I am trying to use categories to provide the structure for my site. I will create sections on my site called England, Wales, Scotland and Ireland . These will be categories. My posts will use custom ...
0
votes
2answers
286 views

Default category link for a custom category is a broken link

I'm developing a Multisute plugin that is supposed to setup sites using a specific template, including setting up several static pages and menu items, as well as a "Blog" category for blog posts. The ...
0
votes
1answer
66 views

Custom Taxonomy in Permalink from post type

I am using custom post types and custom taxonomies for that post type. This snippet currently sets the permalinks for the post type: 'rewrite' => array('slug' => 'myrewritebase'), I am ...
1
vote
1answer
264 views

Need to add rewrite rule that adds in additional information about the post to url

A have a post type for venues which have the attributes title, state, and suburb. Currently using the default WordPress permalinks I get the following format: mysite.com/venue/{title} However, I ...
1
vote
2answers
140 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 ...
1
vote
0answers
163 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 ...
1
vote
0answers
284 views

htaccess rewrite conflict with wordpress rules and ssl

this one has me buggered- I have the below htaccess rule to redirect ssl to non-ssl pages. this works fine, except I'd like to exclude certain wordpress requests from this rule- for example, ...
1
vote
4answers
3k views

Wordpress not respecting template hierarchy (fetches index.php instead of single.php or page.php)

I've encountered a strange error while developing a custom theme. After finishing editing the template for a custom post type single view, I passed onto working at the template files for pages and I ...
0
votes
4answers
384 views

How to access .html file that's located in the theme folder from the browser?

By default you cannot access a file inside the theme folder directly from the browser, what changes should I make to make an exception?
1
vote
1answer
131 views

add_rewrite_rule behaving strangely

I'm customizing another plugin by changing the rewrite rule, from: add_rewrite_rule('^api/auth/([0-9]+)?/?','index.php?__api=1&uid=$matches[1]','top'); to: ...
2
votes
1answer
89 views

How to get wordpress link to fully evaluate when coming from facebook

The short version: Any link from Facebook to a page stops evaluating at the "hardcoded page" in the wordpress press install, ignoring the remaining parts of the URL. It doesn't allow the shortcode ...
5
votes
1answer
2k views

Rewrite Rule for Multilingual Website, Like qTranslate?

I would like to write my own little plugin for language switching. For that, the very first thing would be to get the rewrite rules running. I have been looking around the web for 2 hours, but I ...
1
vote
1answer
381 views

Rewrite rule for a query string

I have a taxonomy search form and the link output is http://localhost/wp/?cityid=16 But i want it to be rewrited as http://localhost/wp/cityid/16 .htaccess # BEGIN WordPress <IfModule ...
1
vote
0answers
88 views

Getting 404 error on my wp rewrite error

The code I'm using to rewrite urls with query vars: function add_query_vars($aVars) { $aVars[] = "city"; $aVars[] = "address"; $aVars[] = "pg"; return $aVars; } // hook add_query_vars ...
0
votes
1answer
302 views

rewrite rules hierarchical

I want that my WordPress follow this rules: /productes/ a page with all products /productes/[category]/ a taxonomy-page with all products of the category /productes/[category]/[subcategory]/ a ...
1
vote
0answers
141 views

Evaluating a external rewrite rule before internal wordpress rewrite rule

I am been plucking out my hairs since last few days trying to solve this problem: I want to convert my urls from format http://example.com/prodsearch/category/tag1-tag2-tag3-tag4 to ...
1
vote
1answer
447 views

remove_query_arg() on rewrite rule

I'm attempting to add a Back to Search Results link which in essence will simply link back to the starting search page - for example /?s=test. I've taken a look at the global query vars and do see ...
1
vote
1answer
95 views

Different rewrite rules for taxonomies and cp in multisite?

I´m making a multilingual site with multisite and I`m wondering if you can specify different rewrite rules for taxonomies and custom posts for the different sites, that are using the same theme. Maybe ...
1
vote
0answers
1k views

How to change “attachment_id” in attachment permarlink?

I changed attachment permalink by add_filter('attachment_link','my_media_url'); from http://domain.com/?attachment_id=123 to: http://domain.com/?media=123 The change is successful. But, with the ...