Refers to the process whereby an URL is manipulated to create what in WordPress is called a "pretty permalink"

learn more… | top users | synonyms (1)

26
votes
1answer
8k views

A tool to analyze rewrite rules? [closed]

Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. I have created something myself and will post it here so others can use it, ...
21
votes
1answer
20k views

Need help with add_rewrite_rule

SOLUTION I've gone with Update 3 and have got it working. What I had misunderstood, was that I believed that a rewrite rule would change designers/?designer=some-designer&bid=9 to ...
16
votes
8answers
13k views

How do you create a “virtual” page in WordPress

I'm trying to create a custom API endpoint in WordPress, and I need to redirect requests to a virtual page in the root of WordPress to an actual page that ships with my plug-in. So basically, all ...
14
votes
2answers
8k views

Mixing custom post type and taxonomy rewrite structures?

Basically I want to achieve a glossary using custom post types and have some issues setting up rewrites the way I want them to be. I want it like that: The main glossary URL: ...
11
votes
1answer
12k views

How to create custom URL routes?

I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
10
votes
4answers
5k views

Remove custom post type slug from URL

Haven't found a useful answer for this. I am aware of the conflict issues and all the problems this may cause, I'm curious if it's POSSIBLE not SUGGESTED. This will require WP rewrites, I know this ...
9
votes
1answer
1k views

Using the Rewrite API to Construct a RESTful URL

I'm trying to generate rewrite rules for a RESTful API. I just want to see if there is a better way to make this work than having to write out every possible rewrite combination. Ok so I have 4 ...
8
votes
3answers
5k views

Masking wp-content/themes/name/images to just images directory using htaccess

I'm trying what I thought would be something really simple of masking my url but cannot seem to get it to work. I want to be able to link to images in my img tag without having to type in the full ...
8
votes
1answer
1k views

Does WordPress keep track of a post's URL history and provide automatic redirects?

I just changed the URL of one of my posts from http://2011.denmark.wordcamp.org/session/theme-frameworks-trends-og-standardisering/ to ...
8
votes
3answers
3k views

How to create a front end user profile with a friendly permalink

I want to create a public front-end profile page with a friendly url like this format. mysite.com/user/someusername Any idea on how can i achieve this? I know it has something to do with rewrite ...
8
votes
3answers
5k views

WordPress Rewrite Rules for Custom Post Type and Taxonomy

I have found this place to be a good source of information in the past through a lot of Googling for the problems I have run into. My question pertains to the verbose rewrite rules WordPress uses. I ...
7
votes
2answers
1k views

Permalink format: singular or plural

The default is singular, e.g. http://example.com/category/apple/ But I am wondering if it is better to use the plural form, e.g. http://example.com/categories/apple/ Are there any guideline on ...
7
votes
1answer
11k views

Passing and retrieving query vars in wordpress

I have two authors pages, one displays about 5 posts. Then I'm trying to setup another page that will be all of their posts. I have created a template called moreauthorposts.php and I'm trying to ...
7
votes
1answer
3k views

custom taxonomy and pages rewrite slug conflict gives 404

I'm using the Custom Post Type UI plugin to create my custom taxonomies. I have a portfolio that is made up of projects (custom post type) with 2 custom taxonomies of technologies and clients. The ...
7
votes
1answer
279 views

Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?

I am running a site for a German NGO under the domain sub.example.org. Recently, I added sub.example.ch for its Swiss spin-off. Both (sub-)domains are pointing to the same physical location, a WP ...
6
votes
2answers
2k views

Override default url for author pages?

So the default url to display a list of posts by a particular author looks like this: http://domain.com/author/{username} I am wondering how to change the 'author' in that url to something else? I ...
6
votes
3answers
4k views

Add .html (dot HTML) extension to custom post types

Is there any way to add the .html extension to custom post types without plugin ? For posts I can use /%postname.html on the permalink settings For pages I can use: add_action('init', ...
6
votes
2answers
1k views

How does WordPress handle permalinks?

WordPress auto corrects the permalinks(URLs) even if it is entered incorrectly. For e.g. WordPress will land you in example.com/some-post even if you enter example.com/idontexist/some-post or even ...
6
votes
1answer
501 views

How to remove dates from existing permalinks?

After doing some research about dates on blogs, it seems like it is a good idea to remove them from the existing posts. Consider: Self-hosted (on Bluehost) Over 1,000 existing posts All posts are ...
6
votes
3answers
2k views

Pretty URLs for File Uploads?

Can files such as PDFs be uploaded to custom URLs? I would like to upload a PDF to www.example.com/whitepapers/pdf.pdf instead of www.example.com/wp-uploads/.... I found a plugin called WP Easy ...
6
votes
1answer
2k views

Pretty permalinks for search results with extra query var

I'd like to know how I can rewrite a search URL that also contains an extra query var into a pretty permalink using wp_redirect and the template_redirect hook. I have taken the code from the Nice ...
6
votes
1answer
436 views

Rewrite URL - how to do a SEO-friendly Unicode custom URL?

After a major load of 404 with some category and tag URL, I questioned on StackOverflow about my WordPress blog. My blog is in Unicode Bānglā. After a nice anatomy on the fact in Facebook1 with some ...
6
votes
2answers
735 views

Problem with add_rewrite_rule and pagination (paged and page query_vars)

I have a custom taxonomy named location and I want to add sections like 'news' and 'marketplace' for each term, so my url looks like /location/montreal/news/ It works perfectly until I try to add ...
5
votes
2answers
3k views

Change the “page” slug in pagination

Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2". How can I change that rewrite rule? I also want to change ...
5
votes
2answers
10k views

Custom Post Type URL Rewriting?

I setup a custom post type for my portfolio projects. The main URL for this is located at /projects/ Now I've also setup my blog posts permalink to /articles/*/ for the permalink structure. This ...
5
votes
1answer
3k views

Custom post type, no need for single view, plus want permalink rewrites that include hash in URI

We are using CPT's to manage a frequently asked questions page on a site, where the question is the post title and the answer is the post content. There is a main page for the FAQs that shows all ...
5
votes
2answers
9k views

How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?

I'm using Wordpress 3.1.3 as a full CMS, installed in the root directory of a domain. I have it setup using the built in options to have a static page as the home page, and then my blog at ...
5
votes
1answer
3k views

Change Author Base Slug for different Roles

is it possible to change the author base slug in dependency of the role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username% ? I am thinking of ...
5
votes
3answers
4k views

Custom permalinks with NextGEN Gallery

i set my wordpress permlink to /%category%/%postname% now i'm using Nextgen Gallery so when i have a gallery in a page it will be something like /cat/page?gallery=10 i want to make it something like ...
5
votes
3answers
1k views

Custom Post Type and Taxonomy URL rewrite

I'm creating custom theme for my personal website using Wordpress 3.5.1. I have problem with the WordPress custom post type and taxonomy, here's the detail: custom post type name: articles taxonomy ...
5
votes
1answer
238 views

Date based URLs for custom posts and pagination

I have created a custom permalink structure for a custom post type (events) using the code below: $GLOBALS["wp"]->add_query_var("event_year"); $GLOBALS["wp"]->add_query_var("event_monthnum"); ...
5
votes
1answer
1k views

Custom post type yearly/ monthly archive permalinks

I have a custom post type "news" in my Wordpress site. I am using Advanced Custom Fields plugin to add meta data to each post. I want to create an array of news items as an archive: [2013] ...
5
votes
1answer
267 views

Clash of the rewrites

I have a category called 'neighborhoods'. I also have child categories within 'neighborhoods' E.G. Lakewood, Highland Park... When I click 'highland park' the url is ...
5
votes
1answer
534 views

External/non-WP rewrite rules

I have a fairly complex wordpress with multiple sub-directories: example.com/sub1/ example.com/sub2/ I'm trying to implement some history/bookmark support, and to do that I need the URLS containing ...
5
votes
3answers
749 views

How-to add rewrite rules to point the uploads folder to a subdomain

The goal Point the upload-folder to a static subdomain to serve adaptive images, that can get cached. WordPress Rewrite Rules You can read more in detail about rewrite rules API at Christopher Davis ...
5
votes
1answer
3k views

How can I rewrite URLs to pass taxonomy and post type values to the query?

So I have a site with about 6 custom post types.Three of these post types are attached to a single custom taxonomy. I would like to be able to list_cats in the sidebar and spit out a url like ...
4
votes
3answers
14k views

How to redirect/rewrite all /wp-login requests

Is there any simple way to have wordpress, php or apache rewrite all urls which involve /wp-admin to /admin? I have added this entry to my .htaccess file: RewriteRule ^admin /wp-login.php [L] ...
4
votes
5answers
4k views

Relative URLs and hide /wp-content/themes/

in my header and other sections I would like to use <script src="/incs/js/script.js"></script> While maintaining the default theme folder structure in server as below ...
4
votes
2answers
232 views

How to seamlessly redirect between different archive and singular slugs?

I have a CPT with slug function (singular) and archive slug functions (plural). Permalink structure for: singular is /function/[postname]/ archive is /functions/[page-x/]. (can poke live at ...
4
votes
1answer
9k views

Rewriting a custom-post-type permalink with taxonomy term?

I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type add_action('init', 'wr_events'); function wr_events() { ...
4
votes
1answer
463 views

How do I add a server-independent external rewrite rule?

External rewrite rules are awesome. They let you define rewrites that don't necessarily pass through WordPress' index.php. This means you can map arbitrary rules to arbitrary files like: ...
4
votes
3answers
1k views

add_rewrite_rule not loading correct page nor getting variables

I've trying to get a showreel title and video id into an URL that can then be accessed by the page. i have the two in the same URL and it either doesn't work or only one comes in. Currently the page ...
4
votes
1answer
3k views

Custom rewrite rules for pages

I'm trying to get WordPress to recognize a URL structure like this: example.com/parent/page/{id}/{first_name}/{last_name} The basic ideea is that I need to access the id, first_name and last_name ...
4
votes
2answers
491 views

Preserving $_GET parameter while using custom Rewrite Rule

This third party add-on plugin for Gravity Forms allows you to edit existing posts via the front end when you embed a form in your chosen template. All you need to do is append the GET ...
4
votes
1answer
353 views

Display posts with author in the url with custom post types

I'm having a really difficult time with this. I have a multi-user gallery site. Each author has his own page that lists the author's posts (this is a custom post type). I have made it so that the ...
4
votes
1answer
569 views

Add forward slash on categories url (serve one version of a url)

How can I a add forward slash on categories URLs and serve only that version of a category (meaning URLs not ending in forward-slash will redirect to URLs ending in forward slash). I manage to remove ...
4
votes
3answers
1k views

Using /%postname% for a custom post type

I have a custom post type whose permalink needs to sit in the same space as pages, like so: /an-example-thing <-- custom post type 'thing' /about-the-things <-- a normal page I'm well ...
4
votes
2answers
2k views

Filtering categories in the permalink structure

Using /%category%/%postname%/ for the permalink I get a URL string of all the categories that the specific post is included in. I would like the categories in the url to be filtered down to only one ...
4
votes
1answer
102 views

Pretty Permalinks

I've created my own search functionality which basically finds the nearest store closest to the entered postal code. My URL for the search currently looks like this ...
4
votes
1answer
118 views

Using a page template without a page

Does anyone know if it's possible to use a page template on a URL, even if a page doesn't exist for that page? When building sites, I create the relevant pages to ensure use of the templates, but ...