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

Custom post type “preview” not working

I'm having an issue with custom post type "draft" post previews redirecting to the site home page, if I have pretty permalinks enabled. For instance, I create a new "Project", save as draft, and ...
0
votes
0answers
18 views

permalink with partial ajax site

I'm trying to load a page with from a URL with an ajax call. This is what i have : a home page with the url / -> list all movies & events a page called cinema with the url /cinema -> list all ...
0
votes
3answers
498 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 ...
5
votes
1answer
59 views

Custom rewrite rules for archive page and single post

I'm building a Wordpress site with several custom post types. Every post type is a different magazine. I have also a custom meta fields for a magazine year and issue. I would like to have urls (used ...
1
vote
3answers
839 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 /tags/...
1
vote
1answer
547 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 ...
1
vote
1answer
17 views

.htaccess rewrite rule puzzle

Because I need to password protect a subdirectory using cPanel, I modified Wordpress's .htaccess rule as instructed here: https://wordpress.org/support/topic/password-protect-a-directory-with-htaccess ...
0
votes
0answers
8 views

Rewrite Rule for Multistep Estimate Form

I want to be able to create a few rewrite rules and utilize some templates that I've created, but I don't want to be limited by having to create the pages within the WordPress admin ... essentially, I ...
1
vote
1answer
38 views

add_rewrite_rule is not taking effect in Wordpress? .htaccess file doesn't update

I have tried all day to get my own rewrite to work in wordpress, but I simply can't get anything to work. I've tried so many different ways but thing is nothing updates in the .htaccess file so I am ...
0
votes
1answer
696 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 (...
1
vote
1answer
427 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 /%category%/%...
0
votes
1answer
1k views

HTTPS to HTTP rewrite rules not working as expected

I'm struggling at getting these rewrite rules to work and was wondering if someone can point out my error(s). The following should redirect a user to HTTPS if they are at the login page or in the ...
3
votes
2answers
912 views

How do you permanently remove default rewrite rules from the wp_options table?

We have tons of rewrite rules saved in our wp_options table and I'd like to permanently remove any entries that we're not using on our site (such as comment feeds, page attachments, etc.). What's the ...
0
votes
1answer
26 views

Permalinks for a custom post type - with a page template (custom query) and taxonomy archive

I'm having trouble getting my permalinks working with a specific custom post type setup. Here's the code for the custom post type: function jc_attactions() { $labels = array( 'name' => '...
0
votes
1answer
493 views

permalink and add_rewrite_rule - error 404

I'd like to have comments in a separate page with a dedicated template only for posts in a specific category (slug shops). Example: mysite.com/post-incatshops --> mysite.com/post-incatshops/comment ...
3
votes
1answer
57 views

Add rewrite rule to permalink structure

I have a Custom Structure setup for posts in Settings > Permalinks as: /%category%/%post_id%-%postname% This works great for most of my posts, but there is one category that I want to remove the ...
1
vote
1answer
43 views

Does flush_rewrite_rules() remove all rules added by other plugins as well as mine?

I am developing a plugin, and am using add_rewrite_rule followed by flush_rewrite_rules during plugin activation. On plugin deactivation I am using just flush_rewrite_rules to remove the rule that I ...
3
votes
1answer
25 views

Multiple values in a rewrite rule, is it possible?

I'm using url rewrites for a filter i'm building. The current solution works for one selected value. So if I select one type of dish like dinner, it goes to /recipes/dinner/. But what if I want to ...
1
vote
1answer
35 views

Change settings of get_post_type_object

I've a theme with a plugin provided by theme developer for manage portfolios section. This plugin create a custom post type with this code: // Portfolio post type register_post_type('...
0
votes
1answer
480 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
3answers
499 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' add_rewrite_tag('%body-style%','([^&...
1
vote
2answers
585 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
1answer
17 views

remove sub-category of Custom Post Type from permalink structure

I've got my permalinks for a Custom Post Type set to /%custom_taxonomy%/%postname%/ using the Custom Post Type Permalink Plugin to set the custom rules for this CPT. What this gives me is site.com/...
2
votes
1answer
25 views

single-{post_type}.php is not loaded despite flushing rules

I have the following code to define my producto custom type post: add_action('init', 'custom_post_producto'); function custom_post_producto() { $args = array( "label" => '...
0
votes
1answer
23 views

Rewrite /keyword1+keyword2.html to search page | .htaccess

I am facing trouble redirecting the keywords to search page in a wordpress 4.4 setup. What I am trying achieve is to rewrite/redirect www.site.com/**search+keyword.html*** to www.site.com/**?s=...
0
votes
0answers
13 views

I Need Delete Old Rewrite Rules

First, I created a custom category, named: (reviews) I created a classification under this category, the name is: (posts), and (pages) Now, its URL address is: ([abc.com/reviews/posts/page/1] ...
0
votes
0answers
42 views

Rewrite URL/Slug for a Page using a particular page template using Advanced Custom Fields Post Object

Edited 5/20 -- Rewrote to specify my question: I have a Custom Post Type represented as mysite.com/projects/{project-name}/. I'm trying to set up a rewrite rule for Pages that use a particular page ...
0
votes
0answers
15 views

Having to flush_rewrite_rules() everytime I make custom post type

I keep running into this issue where every time I make a new custom post type, I have to flush_rewrite_rules() for it to have a single.php or I get 404 when I go to view the post. Anyone have an idea ...
0
votes
0answers
41 views

Inject a user specific ID into first URL segment

I've got a site that deals with affiliates and needs to inject an affiliate ID directly into the URL string. So for instance if an affiliate's ID is 12345, I would like to inject 12345 into the first ...
2
votes
1answer
171 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
0answers
15 views

Partial matching issues in rewrites api

I'm working on a site that has a lot of custom rewrites. We started with: function em_rewrite() { add_rewrite_rule( '^state/([^/]*)/([^/]*)/?', 'index.php?state=$matches[1]&city=$matches[2]',...
0
votes
0answers
16 views

Rewrite Rules in Custom taxanomy and custom post type

Problem in hand : I have custom categories in wordpress named "Product Categories" with custom post type "Products". i want to change urls from somesite.com/product/airconditioner/voltas/...
0
votes
1answer
290 views

Wordpress in “Couch Mode”?

I am trying to setup a "Couch Mode" (distraction free reading) on my WordPress blog as laid out in this article. The guide in the article follows these steps: Create a new page in WordPress with ...
0
votes
2answers
67 views

How to get a Custom 500 Error Page to show?

I created a 500.html file and would like to get this page loaded for my wordpress site. I'm running on XAMP localhost for now, but I've never done this sort of thing before and would like to be able ...
0
votes
0answers
12 views

Custom rewrite rules on custom posttype

I've got a problem presented to me by a client which I can't seem to fix. They have a Wordpress website with a custom posttype 'projects' This custom posttype has a custom taxonomy 'categories' What ...
0
votes
1answer
18 views

Wordpress URL rewrite after changing web from Joomla

There is a website which was previously run on Joomla. URL structure of Joomla links was index.php/site , index.php/another-site. After changing to WordPress no page is not accessible from Google, I ...
0
votes
1answer
19 views

how to use two permalinks for one custom post type based on categories

I am trying to get 2 different permalink for one custom post type, based on the solution given there. It is working for articles, but I can't get it work for my "film" custom post type. Here is my ...
0
votes
0answers
36 views

Page URL with variable (URL rewrite)

I'm new to this Wordpress & right now I tried to rewrite a specific page that have variable with it. First of all let me explain. I have a page that will retrieve all loggedin user info in a page ...
0
votes
1answer
40 views

Adding a rewrite rule to page that has no fixed variables and pagination

Ive set up a page that users can search posts by tags, four categories, for example. By Room - By Style - By Colour - By Feature, each has an undefined number of sub categories, depending on how many ...
0
votes
0answers
28 views

How to allow specific URL

I need a little bit help on WordPress URL. In Wordpress Backend, I have One page and the page slug is: listing-detail When I try below URL into the browser it's working as per my expectation. xyz....
0
votes
1answer
46 views

/page/ is not working with a custom permalink structure (WooCommerce)

I am running WooCommerce and FacetWP on a WP 4.5 install. I have set the permalink structure of the "Products" to the following, the custom taxonomy is a location based taxonomy. /accommodation/%...
0
votes
1answer
40 views

Custom URL rewrite with add_rewrite_rule

I am trying to create the SEO friendly URL: http:///foto/linse2-at/linse2-at-schloss-altenhof/2618 for this one: http:///?fotograf=linse2-at?gallery=linse2-at-schloss-altenhof&img=2618 For my ...
0
votes
0answers
55 views

WP add_rewrite_endpoint - custom post types destroys permalink URL match

I'm trying to implement AMP-versions to Wordpress posts with a custom plugin. The problem I'm having is that we use a bunch of different post types. They all have their own permalink structure. For ...
0
votes
0answers
20 views

Problem with Author page redirect

When trying to access the author's page (i.e. example.com/author/john) I am redirected to Woocommerce's shop page, however, if john is an admin, then I am redirected to author.php page correctly... ...
0
votes
0answers
27 views

Multiple Post Types and Multiple Taxonomies Issues

I have multiple CPTs that all have multiple taxonomies. The problem I am running into is some of the taxonomies are the same between the different CPTs. This ends up resulting the in the same URLs. ...
1
vote
2answers
59 views

Permalink structure CPT with custom taxonomy fails

I'm getting quite frustrated setting up the correct URL structure for a CPT with a custom taxonomy. I have a CPT called 'courses' with a custom taxonomy called 'course type'. The url structure ...
1
vote
1answer
79 views

Intermittent 404 errors, rewrite rules, and BBPress

I am trying to debug an intermittent 404 issue that may be related to BBPress. I’ve read several other reports about intermittent 404s and BBPress, but none of them are exactly applicable to my ...
0
votes
1answer
65 views

Wordpress custom post type rewrite rule matches all pages returning 404

I've created a custom post type with a rewrite to use the grandparent relationship as the URL like so: function cpt_child(){ $args = array( //code 'rewrite' => array( 'slug' => '%...
0
votes
1answer
45 views

Rewrite CPT child page URL to support query var

I am having some issues with rewrite rules. I have a URL like this: http://www.domain.com/post-type/parent-page/child-page/section-id Which I want to treat via query vars like http://www.domain.com/...