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
393 views

Wordpress Rewrites - How can I pass a variable to Custom Post Type?

I'm looking for a wordpress rewrite that will let me pass a query var. I have a custom post type that produces urls like this: example.com/custom-post-slug/custom-post-title/ my goal is to have ...
0
votes
1answer
272 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
2answers
658 views

Display posts from Custom Post Type in category page on front-end

I created my Custom Post Type (bizdirectory), created a new post (Test Business) and created a new category (Business Directory). But if I add the Business Directory category (slug = business) to my ...
1
vote
1answer
348 views

Custom query_vars and parse_request on wp-admin

I've read this post http://wordpress.org/support/topic/query-vars-in-admin and although it's quite an old question, it suits me perfectly. I'm trying to accomplish what I already posted here: ...
0
votes
1answer
328 views

Custom Post Type Rewrite To Include Parent Page(s)

I have a page title "more" with subpage "cities-guide". Said "cities guide" page has a loop that pulls in posts from custom post type "thailife_city_guide". My permalink structure is ...
1
vote
2answers
374 views

Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess

For a long time I served my blog from http://www.murrayc.com/blog/, with the wordpress installation in /home/murrayc/murrayc.com/blog/. Now I've moved it to http://www.murrayc.com/, without moving the ...
0
votes
0answers
20 views

How to Combine Two Custom Post Types into Single Permalink Structure

The website uses - A) A hierarcical Custom Post Type "Destination" to support the following structure, so each tier of the hierarchy could have its own unique destination guide: Territory - ...
0
votes
3answers
487 views

Pagination: /tags/tag_name/?paged=2 gives a 404 error

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use ...
0
votes
1answer
14 views

How do I reset a rewrite?

I made a mistake in writing a previous rewrite in .htaccess. How do I reset it? My home_url = http://basicsourcemassage.ca/bsmassage My site_url = domain name All pages work fine except for the ...
0
votes
0answers
12 views

Rewrites and Attachments

I'm currently working on a custom post type that has rewrite tags to allow for sub pages. e.g: showcases/project-name/media/ Media being the page. My problem is with attachments and media uploads, ...
3
votes
2answers
438 views

Rewrite url for custom post type

I'm using WPML plugin to translate my site. I have a custom post type called "vinos" and I use this args: $args = array( 'labels' => $labels, 'hierarchical' => false, ...
0
votes
0answers
13 views

how to change some of the rules in the database

I need to add a rewrite rule for a WP page. I noticed that the rule is already part of the existing set, but apparently it is not correct. With the hope some internal mechanism would have replaced ...
0
votes
0answers
28 views

Help with add_rewrite_rule solution

In my Wordpress blog, I configured permalinks > Category base to "magazine" with links having this format: http://www.mydomain.com/magazine/news/europe/france The above link opens the France ...
0
votes
2answers
36 views

Redirect to a file in a WordPress theme directory

I have a site where http://mysite.com/wp-content/themes/mytheme/pdf.php creates a pdf of some content based on what's in a cookie. That URL is pretty ugly. I'd love the url to simply be ...
0
votes
1answer
42 views

How to use wp rewrite to hide form action url?

I have a widget that I'm making that builds a multi-step form which retrieves xml data from a third party plugin (http://xmlplugin.com/geoquote.php). While this plugin is available for use already it ...
0
votes
1answer
14 views

Font Page overrides rewrites

I have a custom rewrite as follows So /shares points to a page I created with a slug images which uses a custom query variable named h626_page. My problem is I want to set the images page as ...
0
votes
2answers
288 views

Custom post type paging 404 error

I've an issue on custom post type, I've create a custom post type called "Agenda" and the rewrite url for http://example.com/agenda it works correctly, it points to the archive-agenda.php template ...
0
votes
2answers
19 views

Rewrite for page with a possible unknown parent page

I am trying to add a wp rewrite for my plugin that allows users to include a shortcode on a page that will then display a calendar. This calendar then requires url params in order to navigate the ...
1
vote
1answer
238 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 ...
0
votes
2answers
13 views

Rewrite the Wordpress URL from custom plugin

I have created a plugin in wordpress. I am making a cURL request to the server and server response is coming to new index.php. Which is in my_plugin/newfolder/newfolder/index.php. Now from the server ...
0
votes
2answers
71 views

Custom post type child page 404

This issue seems to be quite common, but the solutions that worked for others haven't worked for me. I'm using the CPT UI plugin and have created a CPT called 'courses' with the following settings: ...
0
votes
0answers
17 views

Rewriting URLs with Query Strings

I've been (unsuccessfully) attempting to prettify some URLs in a website I'm building in Wordpress, from something like this - ...
0
votes
1answer
416 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 ...
0
votes
1answer
37 views

Rewrite Endpoints and CPTs - How to use in a plugin

I'm working on rewrite rules for a plugin that uses a URL endpoint, /modifier, to create a query_var &modifier=1 to signify it should do something else. The rewrite deals with URLs where ...
0
votes
1answer
66 views

Using get_query_var() from a plugin

I'm trying to do a redirect feature in a plugin and i have an issue. First, the code: add_action( 'init', function(){ add_rewrite_rule( 'go/([^/]+)/?$', 'index.php?redirect_to=$matches[1]', 'top' ...
0
votes
1answer
26 views

.htaccess RewriteBase equivalent for WordPress - Passing a URL as a variable without getting a 404

I have a page ran by a javascript plugin that changes the url every time a slide in a gallery is cycled. This means that while slide 1 is visible, the URL is http://www.sitename.com/gallery/slide1/ ...
0
votes
0answers
18 views

URL rewriting with custom pagination

I'm using a custom query to display the results with the pagination and rewrite the URLs. The following function works fine and displays the URLs in following pattern: ...
0
votes
0answers
26 views

Wordpress permalinks on subfolder in iis7 not working

I have IIS 7.5. mod rewrite active. Currently, my wp site is inside subfolder. Here is web.config in my root folder : <rewrite> <rules> <rule name="site2.com" stopProcessing="true"> ...
0
votes
1answer
41 views

Rewrite Rule for Post “Subpage”, with pagination

I would like to know if is possible to add a "subpage" to a post and in this "subpage" have paginated content, for example: I Have a Post Lorem Ipsum This post has Videos, Photos and Audios as ...
3
votes
2answers
407 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 ...
0
votes
0answers
15 views

Rewriting URLs with query strings and preserving them

straight to the issue - I MUST preserve link structure as follows, otherwise the baby squirrels die: website.com/blog.html?comments=%id% where the %id% stands for ID of post basicaly, that ...
0
votes
1answer
26 views

Why doesn't WP update my .htaccess file?

Before I begin, I do not have WordPress having permissions to update the .htaccess file. That's not what this is about. I'm full aware of that. My problem is WP generates the same file every time for ...
1
vote
0answers
35 views

Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)

I have a custom post type named "tours" and a custom taxonomy named "tour_type". "tour-type" taxonomy is hierarchical. In "tour-type" taxonomy, parent terms are limited to "eco-tours", "daily-tours", ...
1
vote
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
23 views

Change Admin URL

I changed my Wordpress directory structure quite a bit. Here's what I have: define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress'); define('WP_HOME', 'http://' . ...
0
votes
0answers
23 views

WP Rewrite Rules - insert custom rules

function rewriteRules() { add_filter( 'rewrite_rules_array', array( $this, 'my_insert_rewrite_rules')); add_filter( 'query_vars',array( $this, 'my_insert_query_vars')); ...
0
votes
0answers
17 views

URL-parameters and RewriteRule gives 404

In Wordpress I have a template (lets call it template.php) that has content on the following page: example.com/template This page should be able to handle URL-parameters like. I got this to work. ...
0
votes
1answer
38 views

How can I write a rewrite rule to appear to move a multisite?

As we concluded in my question about trying to change the url of a multisite the simplest solution might be to add a rewrite rule, since it is infact only the end result that I'm concerned about here. ...
0
votes
0answers
27 views

URL Rewrite for CPT single posts

I'm struggling with Wordpress' rewrite function I have the following URL structure http://example.com/album/test-7/ 'album' is the slug for the CPT single page 'test-7' is the slug for the CPT ...
0
votes
1answer
35 views

How to add a Rewrite Rule / Category Structure

I'm currently trying to use add_rewrite_rule() to create a rewrite (duh!), for a custom taxonomy page. I've added the rewrite tag "sort" with the following code: ...
0
votes
0answers
26 views

Why is my rewrite rule refreshing the page and removing my variables?

For some reason, the catch-all page rewrite rule is capturing this rewrite, rather than my own rewrite rule. My rewrite rule is listed at the top when doing a var_dump of the rules, as well as when ...
0
votes
1answer
62 views

Add Custom Values to Permalinks Through Custom Fields and Posts

I have two custom post types 1 called melon-parties and another called party-categories. for posts in melon-parties i create a metabox which gets populated from all posts from parties-categories. I ...
0
votes
1answer
89 views

WP Rewrite Rules - Custom post type & taxonomy

I've been beating my head against the wall for a few days trying to figure this out. I have a custom post type and custom taxonomy and I'm trying to get my URL's to work. Here is the URL structure ...
0
votes
1answer
35 views

rewriting for custom taxonomy rewrite

I want to rewrite my custom taxonomy in form of http://mywebsite.com/cars/my-tax All examples i found makes use rewrites and use a new function to get the new permalink... problem is normally to get ...
0
votes
3answers
50 views

How to flush rewrite rules on the activation of any plugin

I created a function in functions.php that adds some rewrite rules: function add_rewrite_rules() { add_rewrite_rule('events/page/([0-9])*/?', 'index.php?pagename=events&paged=$matches[1]', ...
0
votes
1answer
36 views

Custom URL scheme - paramters on custom post type

I have a custom post type set up as Event. Within this post type I have various bit's of content / custom meta which will be used on two or three different pages. I was wondering lets say I had my ...
3
votes
1answer
221 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
0answers
24 views

Unable to manipulate rewrite rules without calling flush_rewrite_rules() each time

I am trying to make a small portfolio website in multiple languages. Just a few pages (the actual blog doesn't need to be in multiple languages), mainly pages that are generated by a own-made plugin. ...
0
votes
0answers
212 views

Multisite sub-directories IIS 7.5 change media/uploads location

I am running WP 3.8.1 Multisite. Sub-directories is configured. I have 10 sub-directory sites and 1 primary site. WordPress is running on a Windows 2008 R2 datacenter 64bit server with IIS 7.5. I have ...
0
votes
0answers
32 views

Permalink clashing with Custom Post Type rewrite rule

I have created a custom post type called 'members' which works correctly. I have set the rewrite rule to... 'rewrite' => array('slug' => 'our-members'), I have then added some items to this ...