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
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
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
30 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
45 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
51 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
0answers
34 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
30 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. ...
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 ...
1
vote
1answer
87 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 ...
1
vote
2answers
69 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: ...
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 ...
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
50 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
86 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
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
418 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
125 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
38 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
334 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
97 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....
0
votes
0answers
72 views

Custom permalinks for search with extra parameters

I am trying to change default WordPress permalinks for search because I added few parameters to search.php the url now is like: https://www.example.com/wordpress?parameter1=test&parameter2=text&...
0
votes
0answers
49 views

RewriteRule to hide Wordpress folder from URL in some cases. How to?

I'm trying to obtain hide wp-content folder from url in this way, to make it easy for visitors: permalink: mysite.com/wp/this-page-en required address: mysite.com/en/this-page The www folder ...
1
vote
1answer
43 views

Does it still make sense using json endpoint ep_mask now that there's the new rest api? [closed]

I was wondering... Maybe I don't get the point here, don't know. I think that the rewrite api is still usefull for creating beautiful frontend urls for regular users. But I'm not sure on adding a json ...
0
votes
1answer
77 views

Dynamic URL, not a physical page within the database

Knowing how WordPress essentially processes page requests (through index.php and .htaccess), I'm trying to figure out the best way to "ignore" a certain permalink structure, or rewrite it in such way ...
0
votes
0answers
47 views

How to correctly translate custom posts url rewrites?

I've got a custom post type 'product'. I've just added the rewrite option: 'rewrite' => array('slug'=>__('products','jungle'),'with_front'=> false) Fine. But I want mydomain.com/products ...
0
votes
1answer
37 views

How to change URL structure for pagination pages?

Hi I'm new to WordPress hence if my question was simple or stupid I'm sorry, but please someone tell me how to change URL for pagination pages. Currently I'm having URL for pagination pages as: www....
2
votes
1answer
16 views

how to get archive urls with same origin for custom types and terms?

This is perhaps a strange question adn maybe doesn't have answers, but I'll try. custom post type: product custom taxonomy 1: product_category custom term: type1 custom taxonomy 2: product_feature ...
1
vote
0answers
22 views

how to change permalinks format for pagination?

Sorry if my question was basic or stupid. Please help me how to do this in wordpress, i m new to wordpress. I have permalinks for pagination page like this www.website.com/customtaxonomy.html/1 www....
0
votes
2answers
97 views

add_rewrite_rule() driving me crazy, rewrite not working when analyzer says it should

I have a special situation and need some help achieving the final step. Background: When I access mydomain.com/category/postname, I get the post as expected. When I access mydomain.com/category/...
0
votes
1answer
34 views

Using rewrite rule to access a view of a plugin from home page

I'm creating a plugin that has a view in front-end and i have a link in home page to access it: /wp-content/plugins/wp-test-plugin/public/partials/wp-test-plugin-public-display.php. But I want a ...
0
votes
0answers
22 views

WordPress removing query strings

I run custom scripts and plugins with GET parameters/query strings. Recently, when I try to access a page with query strings, something happens and the query string gets dropped. This, however only ...
0
votes
0answers
30 views

Change URL to split page with nextpage

I would like to change the URL to the second page of <!--nextpage--> split pages. I have a number of pages like /book/bookname/ that were split into 2 pages, and page 2 is called /book/bookname/...
0
votes
1answer
118 views

$_POST empty in using new php file added to theme

I am using a theme which handles form data with jquery (a handler function defined).I have added a new php file to theme (using it in as template in a wordpress page, also registered with rewrite ...
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
58 views

Rewrite Rules: Post ID within Post Slug for a Custom Post Type

I've got my custom post type slug article and I need the following permalink structure: http://domain.com/article/postname-123/ The number in the end has to be the post ID. I don't want /article/...
4
votes
1answer
133 views

Flush_rewrite_rules not working when settings updated

I have added some custom options to my WordPress CMS within the Reading admin page. I am using these options to set some additional pages that I then have bound to custom operations. This method ...
0
votes
0answers
20 views

rewrite rule added to function.php not work

Hello in my custom plugin i want to set custom rewrite rules. First i trying make this with one rule, so i create functions.php file in my plugin folder and i paste into this code: function ...
8
votes
1answer
218 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 ...
0
votes
0answers
63 views

Add Rewrite Rule giving 404 Error

I'm having a little problem with Wordpress add_rewrite_rule function. I'm trying to accept a user subscription by using the URL from the email I've sent. The hash I use is generated from ...
0
votes
1answer
72 views

Mod_rewritte - remove ?m=1 from url

Previously, in blogger, desktops were seeing my posts at http://www.example.com/year/month/postname.html while mobiles were directed to an automatically created mobile version at http://www....
1
vote
1answer
45 views

Enpoint Not Found in Rewrite Tag Permalink

I'm trying to make an XML feed show nice and pretty permalinks rather than showing query strings. The problem is I can't get my /products/ endpoint to show up when trying to process my custom rewrite ...
0
votes
1answer
65 views

Add URL Rewrite Rule To Wordpress

my link http://localhost/abm/?ct_city=la-jolla&search-listings=true i want to this http://localhost/abm/USA/la-jolla Could you help please.. htpaccss file # BEGIN WordPress <IfModule ...
0
votes
1answer
23 views

How to disable wordpress page rewrite rule?

I am having a problem with some rewrite rules. I am using a plugin that makes requests like this: /pluginname?nonce=123456789&action=submit the problem with this is that my wp installation takes ...
1
vote
1answer
126 views

Rewrite Wordpress URL to show CPT meta field data

I'm stuck in need of a rewrite rule. I have set up a custom post type for 'Books', each book has a repeatable field (using ACF Pro) for chapters. I have added a query_var for chapter using the code ...
0
votes
2answers
67 views

Rewriting in wordpress url

Yes we love to make the url more shorter ,more clean. Lets say we have css url like this xxx.com/wp-content/theme_name/css/my_custom_css.css However i would love to display it like this xxx.com/...