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

Rewriting base name Taxonomy same Post Type

I have a Custom post type called "events" and taxonomy called "cat-events". I'd like this structure: website.com/events/ website.com/events/post-name (es: website.com/events/the-best-musical-2014) ...
4
votes
2answers
553 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
1answer
469 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
0answers
21 views

Custom Post Type rewrite permalink

I am trying to rewrite permalinks for my custom post type. The structure I look is: /%custom_post_type%/%custom_taxonomy%/%date%/%postname% Any ideas how can I achieve that?
0
votes
0answers
20 views

Rewrite rule for parameter in the URL doesn't work

I am working on an existing project that uses this plugin https://wordpress.org/plugins/edit-author-slug/ in order to edit the "base" of an user's path. Actually the urls are something like this: ...
0
votes
0answers
12 views

Rewrite Rule To Own File

Is it possible to add a rewrite rule to redirect to a page other than index.php? For example: add_rewrite_rule('([^/]*)/preview/?','preview.php?page_title=$matches[1]','top'); The above code only ...
0
votes
0answers
15 views

Wordpress internally rewrite rule challenge

Questions 1: I work on wordpress website for a client. But the client like to have a deep level url structure. The custom post type can be from level 1 to unlimited levels in the url structure. ...
1
vote
0answers
44 views

Rewrite rule for path of favicon.ico ( Add_rewrite_rule function possible ? )

Hi Wordpress developers ! I'm wondering, is it possible to make by PHP and power of Wordpress following: If user access http://localhost/favicon.ico, is it possible to make show user data from ...
0
votes
0answers
23 views

htaccess url rewrite within WP installation

I want to use one of my subdomains to rewrite urls and finally forward to an origin extern domain. Example: goto.mydomain.com/1saKCA3 -> externdomain.com/1saKCA3 I already tried to implement the ...
0
votes
0answers
6 views

Creating custom rewrite rules for site sections

I have a WordPress site with several custom post types. I would like to group them by a URL prefix. Maybe something like this: www.example.com/ prefix_one/ post_type_one/ ...
0
votes
2answers
10 views

Best way to redirect site in subdirectory to root?

I have a WP 4.0 site that has been installed at: mydomain.com/site It's been there for many years, so there are lots of links from around the web pointing to it. As part of an overhaul I am doing, ...
1
vote
1answer
253 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
1answer
28 views

Rewrite rule not passing variable

I have the following code in my functions.php file, and it simply will not work to return the value passed via the URL. This is the code below: function custom_url_source() { ...
0
votes
1answer
281 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
27 views

How does WP determine the difference between a post and a page url

I'm trying to mimic WP routing in a javascript plugin. I've successfully imported the rewrite rules and am applying them to the browser location. But I can't seem to parse the difference between a ...
0
votes
0answers
24 views

Rewrite of custom taxonomy displayed on a page

I have a custom taxonomy "product-category". All parent terms are displayed and linked on a page myurl.com/directory/ with some custom code. Example link: /directory/accessories This gives me a 404, ...
1
vote
1answer
445 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 ...
2
votes
1answer
69 views

Can someone explain the function of the third parameter of “add_rewrite_tag”

Can you please explain the third function parameter queryreplace of add_rewrite_tag. Explanation with code examples will be much appreciated. UPDATE i wrote this code below to make a page with slug ...
0
votes
2answers
23 views

How can I set up a secondary permalink structure?

So I have a situation on a site where I need multiple permalink structures. Now, I already know what you're going to say because literally every Google and SX result I've looked through says the same ...
3
votes
1answer
229 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 ...
2
votes
0answers
53 views

Reading Settings -> Front Page displays “Static Page” being reset

Every day my WordPress blog is going from a static page, back to "your latest posts". I am not setting this setting, something is doing this automatically! Any ideas what to check for? Is there any ...
0
votes
2answers
356 views

add_rewrite_rule not working for me

I have the following rewrite tags defined: // ADD REWRITE TAG FOR 'VEHICLE MAKES' add_rewrite_tag('%make%','([^&]+)'); // ADD REWRITE TAG FOR 'BODY STYLES' ...
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 ...
1
vote
1answer
696 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
338 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 ...
0
votes
1answer
288 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 ...
0
votes
0answers
12 views

Difference between flush_rewrite_rules() and Settings > Permalinks

The issue I'm currently having is that I have 404 errors on all of my pages besides the home page. I can recreate this when I import and overwrite the WordPress database. Sometimes it happens after ...
1
vote
2answers
749 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
2answers
336 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
1answer
25 views

Custom Endpoint For Custom Post Type from Child Theme

I'm working with a child theme. Main theme has a custom post type called "Place". I need to change that into "Location". However, I changed all levels using wp_post_types object. Now I need to change ...
2
votes
1answer
788 views

How to add custom rewrite rule to .htaccess?

I want to add a custom rewrite rule to my .htaccess file using a function inside functions.php The rewrite rule I want to add is as follows: RedirectMatch 301 ^/author/(.+)$ http://name-blog.com/$1 ...
1
vote
2answers
400 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 ...
1
vote
3answers
570 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
22 views

Flush rewrite rules on option update with Settings API

I'm working on some plugin where I need to enable custom URL rewrites. I want to enable editing of custom URL through Settings API, so basically I did everything that's needed to validate and update ...
0
votes
0answers
12 views

permalink problem in my .htaccess page

Please give me a suggestion for my question. when we set permalink in our site then the .htaccess code is RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
20 views

Change the custom post type permalink

I have projects category in my theme ( custom post type ). my link goes like this http://shaowtriger.com/project/naim/ my required link is http://shaowtriger.com/brands/naim/ I also ...
0
votes
0answers
22 views

I want to add one extra field to my URLs, I'm using Rewrite functions but it doesn't work

I think my question isn't in the right way, I just ask it. I want this routings for my wordpress site (for example in Custom PostType Archive page): example.com/VALUE => ...
0
votes
1answer
24 views

Add_rewrite_rule doesn't seem to work?

I am trying to get my two custom post types to work properly. Let's say the two Custom Post Types (CPT) are books and reviews. now i like mydomain.com/books/the-great-gatsby/reviews/33 to show ...
0
votes
0answers
21 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
1answer
38 views

Why won't this rewrite rule work?

Here's the setup. I have a custom post type 'Businesses'. I have a custom taxonomy 'Display Category'. And I have a second custom taxonomy 'Filters' Both taxonomies are set to work with the custom ...
0
votes
1answer
26 views

Where to hook to bypass instantiating WP_Query?

I'm a bit stalled in a plugin creation, as I do not find a way to elegantly hook things up. A strip down version of my problem is the following: Boot Wordpress completely (core and plugins) Detect ...
0
votes
0answers
13 views

Disable RewriteRules for all plugins and WP programmatically

I want to be able to disable all RewriteRules that WordPress and the plugins use for one page. Is that possible? Basically disable it all when page_id==X.
0
votes
0answers
39 views

fixing permalink structure

I am having trouble with my permalink structure of my site. I have a custom post type and custom taxonomy for that post type. These are both made within PODS if that makes a difference. For whatever ...
1
vote
0answers
67 views

remove base slug from hierarchical custom post type

I've tried various methods posted here and on stackoverflow and none of them work unfortunately. My CPT is "service_locations" and by default has this structure for main pages: ...
0
votes
0answers
18 views

Complicated site setup; previews not working

I have a site which is hosted on a linux box (blog.example.com). I have a main site which is on a separate windows IIS box using the domain www.example.com. I have an IIS rewrite rule which rewrites ...
2
votes
1answer
58 views

Permalinks, Rewrites, Get Variables, Oh My!

Ok, so I know it's a silly title, but it's exactly how I feel right now.. I've created some custom rewrites for WordPress and they work great, the only problem is that now I need to add pagination. ...
0
votes
0answers
21 views

Exclude one specific slug from rewrite rule

I use the following rewrite rules to show a specific post of a custom post type in a category and all posts of a custom post type within a category: add_filter('rewrite_rules_array', ...
0
votes
1answer
51 views

Rewrite slug of custom post type to include post-id

My current permalink setting is /%postname%/%post_id%/. Would like to use the same with CPT. Currently the URL looks as site.com/questions/title/ Would like to get post id at the end of the url on ...
1
vote
1answer
157 views

Migration from old CMS to WordPress 301 redirection rules?

I need 301 redirection rule for migrating old CMS to WordPress. On old CMS I have URL structure like this: I wish is to move my site to WordPress and to have all old (or most) URLs with 301 redirect ...
0
votes
0answers
31 views

Rewrite Rule Not Working

I am trying to use a rewrite rule to get 3 variables from the URL. Here is my rule: add_action( 'init', 'pe_rewrite' ); function pe_rewrite(){ add_rewrite_rule( ...