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
20 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
39 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
29 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
51 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
54 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
73 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
24 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
62 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
89 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
79 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
54 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/...
0
votes
0answers
30 views

How do I generate 301 redirect?

I am working on the function which is supposed to add 301 redirect when the permalink gets changed (for example, when we change categories structure). The idea behind is to keep the old URL in a meta ...
1
vote
4answers
737 views

Flush Rewrite Rules when new site is created on network

I am working with a multisite setup and I have created some custom post types, which seem to work fine except when trying to view any of the post types pages on the front end, I get a white screen. ...
0
votes
0answers
81 views

Dynamically Change Base Permalink Prefix For Custom Taxonomies (Categories)

I'd like to change/modify the permalink structure for the standard and custom post-types and taxonomies, such that the base being prefixed to the permalink dynamically changes for each post-type and ...
1
vote
1answer
25 views

How to handle this URL Structure. Keep getting “page not found”

I have created two Custom Post Types, named "test" and "articles". I am trying to achieve below URL structure: site.com/test/post-title - for post type test. Works fine. site.com/test/articles/post-...
1
vote
1answer
63 views

Change permalink for a single post entry

I've defined a custom post type, projects, and I've set the permalink for those post types to /projects/my-project/. However, for one of the projects, I need to give it a special URL, so instead of /...
0
votes
1answer
18 views

page not found for example.com/custom-post-name

i have created custom post type: jobs custom taxonomy : jobs_division I wanted url like Custom permalink structure: /%custom-post-type%/%custom-taxonomy%/%post-name%/ I have registered custom ...
0
votes
0answers
18 views

Help with custom posts being rewritten to standard posts

I am having a bit of an issue with custom posts. My setup is WP4.4 with the following plugins: Yoast SEO Toolset Types Custom Post Type Permalinks I am rebuilding our company motorcycle website ...
0
votes
2answers
16 views

Adding Rewrite URL for Base + Children Separately

I have a main page and beyond that it has children. I successfully rewrite the children like so: add_rewrite_rule('my-url/?([^/]*)', 'index.php?my-var=$matches[1]', 'top'); This works great. But ...
1
vote
2answers
1k views

WordPress keeps writing rewrite rules to .htaccess

WordPress keeps writing rewrite rules into .htaccess again and again till it causes an error and causes server to return 500 Internal server error... i.e. My .htaccess is a series of # BEGIN ...
1
vote
1answer
34 views

Help with rewrite rules for two post types

I'm trying to setup two rewrite rules for two post types. Basically, the structure I want is this: site.com/app/course/xxxx/ => adds query_var course site.com/app/course/xxxx/theme/xxxx/ => adss ...
0
votes
1answer
46 views

Multiple query vars sorting combination and url rewrite

I have a custom search page for a custom post type ('program'). There are 4 parameters that can be set up for this search: 'word_search', 'archived', 'category' and 'operating_system'. We can search ...
0
votes
1answer
31 views

Wordpress CPT slug and page slug conflicts

I have one page slug "new-site" also i have another custom post type with same slug "new-site" while i browse site http://example.com/new-site then it directally goes to archive page and show all the ...
0
votes
0answers
26 views

Custom Permalinks for posts with custom taxonomy

I have kind of a unique problem with permalinks and a custom taxonomy that I can't seem to find the answer to. I have created a custom taxonomy called "content_type" which is attached to the "posts" ...
0
votes
0answers
15 views

The Loop doesn't work when using RewriteRule

I am using .htaccess RewriteRule on my page. When user goes to /news RewriteRule actually loads /?nav=news On that page, I use The Wordpress Loop to show recent posts if (have_posts()) { ...
0
votes
1answer
52 views

Add custom query vars to pretty permalinks

I am creating a wordpress plugin where i have some custom query strings appended with the urls to achieve the desired functionality.I require pretty permalinks like post name in the wordress settings. ...
0
votes
2answers
34 views

rewriterule not working

I have post type example with 2 records: exam1 and exam2. This post type was created by plugin Types Toolset (www.wp-types.com). So link to exam1 looks like my_site/example/exam1. Also I have 1 GET-...
0
votes
1answer
33 views

Rewrite URL for a specific taxonomy [duplicate]

I registered a post type of 'product', and also registered a taxonomy 'poruct-cats' for this post type. When I want to access to product-cats it seems like below: example.com/poruct-cats/a-product-...
0
votes
0answers
35 views

Modify custom taxonomy permalink to allow 2 additional parameters?

I have a custom post and taxonomy set up. The only section I have in my website are taxonomy archives. The archive page lists the posts from the current taxonomy term. Each post is viewed in a modal, ...
0
votes
0answers
31 views

flush_rewrite_rules with wp_cron

I'm trying to build myself a plugin for remote viewing data of all my WordPress installations in one overview. Therefore I'm generating a list using xmlrpc to remote connect to all the WordPress ...
4
votes
2answers
200 views

permalink independent on the post's name stored in the database

I'm trying to make a custom permalink structure for my posts. www.example.com / post / %post_id% / %posttitle% / In this permalink, the post's ID comes first, then the post's title after it. ...
1
vote
2answers
71 views

Remove base slug in CPT & CT, use CT in permalink

I've come quite far, but can't manage to get this to work. I'd like to remove the base slug from my Custom Post Type review and my Custom Taxonomy brand. The final result should be a URL like this: ...
8
votes
1answer
220 views

Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?

I am writing a plugin that instantiates a custom post type (among other things). It is a multisite plugin and lives in the directory mu-plugins. What is the best practice for handling ...
1
vote
1answer
177 views

Rewrite rules and query for virtual page

My question comes from this one. I have never really touched on rewrite rules as frankly, they still do not make sense to me What I have I have successfully build the following link http://...
0
votes
1answer
17 views

Rewrite Rule added but showing 404 rather than specified page

I have the following rewrite rule function coaching_apply_rule() { add_rewrite_rule('^coaching/apply/', 'index.php?page_id=5156', 'top'); } add_action('init', 'coaching_apply_rule'); Reason for ...
0
votes
0answers
27 views

Update broke rewrite rule

With the update from 4.4 to 4.4.1 somehow suddenly my rewrites aren't working anymore. I've written a plugin to show attachments on a page (the landing page specifically) so people that come to the ...
3
votes
6answers
7k views

URL Rewrite + Page + Custom Post Type = Unusual Redirect

Yet another URL rewrite issue :) The Problem I have a URL rewrite rule that should work, but against all logic it redirects without passing the query var. The Juicy Details The site has a page ...
0
votes
0answers
15 views

rewrite rule stopped working

I have added a custom rewrite rule + custom query var <?php add_filter('query_vars', 'add_query_vars'); function add_query_vars($aVars) { $aVars[] = "activePage"; return $aVars; } add_action(...
3
votes
1answer
51 views

Cyrillic characters in rewrite rules cause 404 Not Found errors

I have a rewrite rule that includes a page's URI: (<page-uri>)/someaction/(\d+) If the page's URI includes cyrillic characters, such as доска-объявлений, the rule is stored as: (%d0%b4%d0%be%...
0
votes
0answers
87 views

Canonical url differs from custom post type archive URLs

I cannot figure out how to control canonical URL for custom post type archive pages. Here's my excerpt of CPT setting for soccer_club for example. This CPT supports default category taxonomy. $args =...
0
votes
1answer
340 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
0answers
24 views

Any way to make Apache's internal redirect work?

What I really want to do is to make URLs like http://localhost/bmicalc/bmi24.57 to redirect to http://localhost/bmicalc/index.php?pagename=bmi&result=24.57 without changing the URL in the ...
0
votes
1answer
420 views

Custom rewrite rule for hierarchical custom post type

Working on a client site I've encounter my worst enemy... WP URL rewrite :(. I actually can't figure it out and after many days trying and searching, I can't make it work. What I'm trying to get is ...
1
vote
2answers
126 views

Permalinks: Page Not Found

When I open the newly created page in WordPress I get page not found but when I reset the permalinks to none http://localhost/?page_id=6 opens normally . Even with this permalink it works : /index....
0
votes
1answer
29 views

How can I reduce the number of rewrite rules?

I'm building a robust filtering system for my WordPress site, and I really want to have pretty permalinks for the resulting URLs. But because I'm offering a large amount of different filtering options,...
0
votes
0answers
39 views

Permalink structure between 2 custom post types and a taxonomy

Ok here is the scenario. I have a custom post type called "Communities", a custom post type called "Community Posts" and a taxonomy under "Community Posts" called "Communities". The idea here is that ...
1
vote
1answer
337 views

Parent & Child Taxonomy slugs in custom post permalink

I've registered a custom post type "book" and a taxonomy "authors" as below: add_action( 'init', 'post_book_init' ); function post_book_init() { $labels = array( 'name' =&...
0
votes
0answers
99 views

Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)

I want to publish and organize issues with WordPress. The magazine is structured into issues (for example Magazine n°23), categories (always the same categories regardless the issue) and finally posts....