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

Rewrite rules are correct but ignored

I am trying to get the following URL to point to a particular WordPress page. URL/courses/computer-course/units/ needs to redirect to URL/units/ with coursename='computer-course' and page_id='228'. ...
0
votes
0answers
26 views

Rewrite rules lead to blank page

Using a child theme, with custom post type article, trying to call a file from functions folder inside the child theme main folder (child-theme/functions), using this code in the child theme ...
0
votes
1answer
16 views

Custom Taxonomy and Rewrite URL

I'm fixing some custom templates. There is this custom taxonomies add_action( 'init', 'custom_taxonomies', 0 ); function custom_taxonomies() { register_taxonomy('news_category', 'stfp_news', array( ...
0
votes
0answers
17 views

URL rewriting, problem getting arguments

How can I get URL/courses/[course_name] to point to URL/index.php?page_id=127&course_name=[course_name]? The redirection works well but I can't access the course_name argument. In fact, the page ...
1
vote
1answer
29 views

Am I using the flush_rewrite_rules function in the right place?

Hello dears I'm writing an admin panel for my new WordPress plugin base on the WordPress Settings APIs. I am defining a field for changing custom post slug from this admin panel. After the custom ...
0
votes
0answers
10 views

query var “p” empty on some requests | custom rewrite rules

I am moving a site from drupal to WordPress. The "nodes" on drupal have custom "permalinks" that don't follow any rules so I have added the permalinks as post meta and create a rewrite rule for every ...
1
vote
3answers
437 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 ...
1
vote
1answer
8 views

Default post tab showing twice in admin bar

I have to re-register WordPress default post type to change the post slug to "blog", changing permalink structure was not worked for me as it rewrite custom post types slugs also. So I used below code ...
0
votes
1answer
614 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
13 views

rewrite_rule - working fine but broken single post 404

I'm having an issue with my rewrite rule, works fine here: example.com/resources/ example.com/resources/articles/ Also works fine with the pagination here: ...
0
votes
1answer
1k 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
492 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 ...
1
vote
1answer
392 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
0answers
54 views

Add custom parameter to permalinks

I have a WordPress page that I would like to use SEO friendly query parameters with. Let's say this wordpress page is accessible by going to http://www.example.com/test and its short URL is ...
0
votes
2answers
446 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
1answer
29 views

Load an url with minimal/no DB queries

What would be an ok way to load a theme template with minimal/no db queries? Another question: is it viable to 'dry' load a non-wordpress template using rewrite rules? So instead of index.php?p=1011 ...
1
vote
2answers
505 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
14 views

Can I use the same permalink base for Categories and Posts?

I am migrating our site from another CMS and the way the permalinks were setup with the prevous CMS are like this: posts: /news/%year%/%monthnum%/%day%/%postname%/ categories: ...
0
votes
1answer
13 views

flush rewrite rules doesn't flush them (still got 404)

So I tried to make a simple plugin for WordPress. Like a reviews. Even tried to do it through the tutorial of TutsPlus. Everytime I got 404 when tried. Then I just took the code from tutor and still ...
0
votes
1answer
74 views

URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”

I have created a custom user meta = shop_name in User Profile and custom post type gallery The default URL of the post is http://localhost/gallery/%gallery% which i have modified to below given URL ...
1
vote
3answers
719 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
2answers
67 views

Custom Rewrite with Query vars

I have been stuck on this for hours and tried all these different methods but none seem to work. I've seen other threads with a similar problem but the solutions are not working for me. I'm hoping ...
1
vote
2answers
1k 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 ...
0
votes
1answer
36 views

Wordpress rewrite rules not working

I have created a plugin and i have gotten rewrite rules to work using my .htaccess file. I would like to make this work from my plugin instead to keep everything contained from within there. Im ...
1
vote
0answers
38 views

Wordpress Deadlock Error

I see more of this error these days in error_log. I see that someone asked this question here a year ago but no solution. Please advise what is causing this issue. Already, tried deactivating some ...
0
votes
0answers
10 views

What to do after a wrong RewriteRule?

I have A Wordpress MU and following this answer I changed my root .htaccess placing this before the Wordpress loop RewriteRule / /subfolder [R=301,L] trying to have a different homepage. It didn't ...
0
votes
1answer
334 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 ...
0
votes
0answers
36 views

Have a WordPress page with same title as custom post type “front” slug

I have a custom post type djs and a custom taxonomy city with two terms: boston and nyc. So a DJ can either be tagged as Boston or NYC. DJ profiles (a single djs post) are located at ...
1
vote
0answers
21 views

Rewrite rule for page with plugin shortcode

I created a plugin to display a list of real estate properties on a page. The list is embedded into a custom page as a shortcode: [real_estate_list status="1"] The list is loaded from an external ...
0
votes
1answer
13 views

Rewrite rules ignored

Why are my rewrite rules being ignored by WordPress? I've got the following rule added: news/([0-9]{4})/?$ archive-news.php?year=$matches[1] but the URL news/2015 gives a 404. Why?
0
votes
0answers
7 views

Rewrite Rules and Archives

I have a URL that looks like this http://localhost/mysite/publications/2015/ and using the Rewrite Rules Inspector plugin released by WordPress I get the following 2 matches for that URL: ...
0
votes
1answer
26 views

Pagination for custom post types - url rewriting

I'm working with custom post type, that I want to paginate, here's part of code, initializing custom post type: $args = array( 'labels' => $labels, 'public' ...
1
vote
1answer
196 views

Regionalised Content

Ok, so - I am working on a magazine style website that requires "regionalised" content. So for example I have: UK (Includes ALL) Manchester Brighton London I have already successfully ...
0
votes
1answer
25 views

Custom Query & Rewritten URL Pagination 404

I have a custom search results page that has the url "/mysearch/location/SUBMITTED DATA/" which works perfectly fine. However I'm now trying to get my pagination working on that page so the URL will ...
4
votes
1answer
376 views

htaccess rewrite conflict with wordpress rules and ssl

this one has me buggered- I have the below htaccess rule to redirect ssl to non-ssl pages. this works fine, except I'd like to exclude certain wordpress requests from this rule- for example, ...
1
vote
0answers
1k views

How to change “attachment_id” in attachment permarlink?

I changed attachment permalink by add_filter('attachment_link','my_media_url'); from http://domain.com/?attachment_id=123 to: http://domain.com/?media=123 The change is successful. But, with the ...
0
votes
1answer
26 views

Rewritten URL not loading WordPress environment

I have a page that I am sending users directly to so I can serve them a PDF dynamically created using the FPDF library. Since I'm sending them directly to the file which generates the PDF, I'm ...
0
votes
1answer
26 views

Wordpress Prevent 404 on missing custom post

The thing I am trying to achieve is to get data from a third party data source and display each piece of information as if it was a "post" in a WP theme. Now, the WP theme intrinsically works with ...
0
votes
0answers
20 views

CPT Rewrite Rules by date

I'm having issues with date categorized posts for my CPT. I have permalinks not on the default. I created a CPT with register_post_type and setup rewrite rule as follows. 'rewrite' => array( ...
0
votes
1answer
43 views

htaccess doesn't cache my latest news when logout

To speed up my website i'm using w3 total cache and some htaccess . . . it works just amazingly ! Otherwise, big problem, I have on my homepage the latest news being display, when I'm login, it ...
0
votes
0answers
24 views

Stop WordPress from redirecting ?p= in custom rewrite rule to slug of page

I've written a custom rewrite rule, which should rewrite a specific case of a taxonomy url to serve a page. The rule is as follows: add_rewrite_tag('%tax_slug%', '([^&]+)'); ...
0
votes
1answer
426 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 ...
0
votes
1answer
336 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 ...
2
votes
1answer
24 views

Single Redirection Rule for Pages and Archive links

I am trying to find pretty URL solution for url parameters. Consider this url set http://example.com?token=foo http://example.com/pagename?token=foo http://example.com/parent/childpage?token=foo ...
0
votes
0answers
17 views

URL Structure for Custom Page Type with Custom Taxonomy

There are a number of questions here that are similar to what I'm trying to do, but none seem to answer what I'm looking for. I have a custom post type with a rewrite like: 'rewrite' => array( ...
0
votes
1answer
29 views

Custom taxonomy Rewrite Rule

I want my taxonomy url to be like this: site.com/page/taxonomy_term How will I be able to achieve this? I have written a wordpress rewrite rule code in my functions.php like this: function ...
0
votes
0answers
19 views

Added incorrect rewrite rule now getting an error

I have made a mistake using add_rewrite_rule() function and now my site is throwing a 500 "internal server error" normally I would just edit/fix the issue in my .htaccess but since this is not how ...
0
votes
0answers
34 views

How can I map a specific URL pattern to a plugin for processing

I want to send traffic of a specific URL pattern to be processed by my plugin. Based on that pattern, I will pull some custom post type information from WP, gather external info via JSON, aggregate ...
0
votes
0answers
7 views

WordPress Rewrite/Query Var .. ignore a word?

I have created an 'event listing' area on my WP website, it uses rewriting and a query var to dynamically load the event 'slug' as a variable so that I can add pages on the fly. However it has broken ...
7
votes
4answers
1k views

Can't get a custom template taxonomy page to display

I've been trying to wade my way through learning the ins and outs of taxonomies and how to integrate them into themes and I've run into a pretty basic issue that I can't seem to figure out. I started ...