A permanent link to an item (a blog post, an attachment, ...). The default structure is "?p=123", but WordPress can handle "pretty permalinks" and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag.

learn more… | top users | synonyms (1)

26
votes
4answers
8k views

Custom post types, taxonomies, and permalinks

This is driving me nuts and I'm sure it's simple but nothing I search for comes up with a simple structure (everything is very complex). I have a custom post type "product_listing" and a custom ...
24
votes
3answers
33k views

Get page link from slug?

Is is possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using get_page_link(): <a href="<?php echo get_page_link(40); ...
22
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 ...
20
votes
2answers
18k views

How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

I've been combing this site and google for the answer and I've come up completely empty. Basically I want to do exactly what this post asks, but I need a hierarchical taxonomy. The answer given in ...
16
votes
3answers
5k views

Adding categories to custom post type in permalink

I know people have asked this before and have gone as far as adding the custom post type, and rewrite for permalink. The problem is I have 340 existing categories which I would like to continue ...
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
8answers
7k views

Remove taxonomy slug from a custom hierarchical taxonomy permalink

I created a 'forum' taxonomy, using these rules: register_taxonomy( 'forum', array('topic'), array( 'public' => true, 'name' => _a('Forums'), 'singular_name' => ...
11
votes
3answers
579 views

Performance of my permalink structure?

I have read the discussion on the performance of different permalinks on the wp hackers mailinglist, THIS forum and around Google. I could however not really deduce if the permalink structure I have ...
9
votes
5answers
3k views

Getting hierarchical custom post type permalinks to work just like pages

I've dug through every question here on custom post type permalinks, but most seem to be either problems with custom taxonomy rewrites, or the obvious missing of flush_rewrite_rules(). But in my case, ...
9
votes
3answers
1k views

What is the best permalink structure for SEO?

In the past I've used the Day and Name or Month and Name settings. Should the date structure be omitted and just have /%postname%/ ? Ie does having the date information reduce the quality of the ...
9
votes
5answers
4k views

Wordpress 3.3 custom post type with /%postname%/ permastruct?

There is earlier post with similar title, but it does not look in to the WordPress 3.3, and that is important as 3.3 advertises interestingly: "Use the postname permalink structure without a ...
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
3answers
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 ...
7
votes
1answer
3k views

Shouldn't this be easy?! Custom post type/custom taxonomy permalink

So this is driving me absolutely insane. I've spend days trying to fix this and I can't work out why this is so difficult as surely this is a very common permalink structure! I looked through ...
7
votes
2answers
422 views

Permalink Structure for Multiple Post Type Archives by Taxonomy

Recently I have been working on an advanced WordPress project, and I'm stuck with changing permalink structure for custom post types. I have created 3 post types lets say: type1, type2, type3 and a ...
6
votes
3answers
4k views

Add extra parameters after permalink?

How can I add extra parameters after a permalink, specifically if I'm using a custom post type? For example, let's say http://mysite/album/record-name was the permalink. How can I make ...
6
votes
3answers
1k views

Nested custom post types with permalinks

I am trying to set up a multi-level custom post type structure with permalinks that look like authors/books/chapters, with authors, books, and chapters all set up as their own custom post type. For ...
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
2k views

How to prevent apostrophes and quotes from appearing in permalinks?

I'm using custom permalinks "/%category%/%postname%/". Whenever a post title contains quotes or apostrophes they appear in the URL. Can someone tell me how prevent them from appearing in the slug? ...
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
4answers
3k views

How do I append multiple taxonomies to the URL?

Multiple taxonomies in URL How does one append multiple taxonomies to the URL having the following: Post Type: products Taxonomy: product_type Taxonomy: product_brand Adding new ...
6
votes
1answer
3k views

Taxonomy, Terms, and Template Files

I have post type 'product' and hierarchical taxonomy 'types' attached to it. In this taxonomy, I have terms: 'dry-clean', 'washer', etc. With several sub terms on each terms. In my situation, I need ...
6
votes
1answer
521 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
2answers
159 views

Mapping Domains to Permalinks (not multisite)

I am trying to do this on a standalone WP installation (not multisite). What I am trying to achieve is: User saves domain.com on usermeta. (done) User creates a new CPT, say company. Which is ...
6
votes
1answer
129 views

Rewriting every url

I have a question regarding permalinks and rewriting url's. I am writing a translation plugin and I would like to add the language shortcode in my url (Something like ...
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
165 views

Removing unnecessary numbers appended to postname in permalinks

I have, with help from Milo managed to tweak the permalinks for my custom post type so that they include the year and month of the event. e.g. mysite.com/events/2013/january/fishing-trip ...
6
votes
1answer
874 views

Permalink with sub-sub-category and post name

Working on a new theme project and I created a custom post type called products with its own custom taxonomy. I want the URL structure to be: ...
6
votes
1answer
936 views

Permalink not working for page without title

I am testing a Wordpress theme using the Wordpress Theme Unit Test test data. One of the test posts has no title. Wordpress generates a permalink of the form: <my-site>/posts/14/ (my ...
5
votes
3answers
4k views

How can I make Capital letter ( upper-case ) permalinks?

How can I make a link like this? http://www.lifecellskin.us/Dev/About the "Using_Permalinks" part, A is Capital letters. But WP automatically convert upper case to lower case. I'm trying to convert ...
5
votes
3answers
4k views

Setting up WordPress with Custom Permalinks and no .htaccess File?

I have a client that strongly prefers to disable .htaccess files because they like to set the Apache configurations themselves. However, they still want SEO-friendly URLs. Is there a way to have ...
5
votes
3answers
296 views

Difference between the_permalink() and get_permalink() function

In WordPress I am using both the_permalink() and get_permalink() functions, but I cannot get any difference in the output of both functions. What is the difference between both functions?
5
votes
1answer
1k views

Rewrite Rule for Multilingual Website, Like qTranslate?

I would like to write my own little plugin for language switching. For that, the very first thing would be to get the rewrite rules running. I have been looking around the web for 2 hours, but I ...
5
votes
1answer
4k views

How to set permalink structure via functions.php

I'm setting up a Wordpress Network and wanted all new sites to have the same permalink structure (i.e. "/%year%/%monthnum%/%postname%/"). I'm wondering if this is possible to do via hooks or hacks in ...
5
votes
3answers
994 views

Strange permalink issue: can't rename /company-2/ to /company/

I created a page titled company. But the permalink turned it into /company-2/, trying to change it to just /company/ doesn't work. The website just has 8 pages and none is called company (don't know ...
5
votes
2answers
10k 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
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() { ...
5
votes
3answers
379 views

Prevent Wordpress from abbreviating-long-slugs…-in-the-admin

On post edit pages, when a slug exceeds a certain number of characters, Wordpress abridges it with an ellipsis (...). For example, if my slug is i-want-to-be-able-to-see-this-slug, it appears on the ...
5
votes
1answer
469 views

custom post type and custom taxonomy permalink

I have 2 pages. /client-a/ /client-b/ I have a custom post type, called "case": $case_type = array( 'labels' => $case_labels, 'public' => true, 'publicly_queryable' => true, ...
5
votes
2answers
6k views

How to handle a hierarchy with custom post types

I have moved into WordPress for a few days and was quite impressed by all the available features, plugins and polished themes. I have spent quite some times reading documentation about themes and ...
5
votes
1answer
241 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
4answers
136 views

Post type child of another post type

This may be a stupid question but is it possible to have a post type child of another post type? Let me explain with an example: I created 2 post types, "Actors" and "Galleries". What i want is to ...
5
votes
1answer
340 views

Wordpress Permalink changes to question mark (?) in URL

My Permalink custom url is /%post_id%/%postname%/ and my website is in Persian language, for some posts the Permalink is change in URL from ...
5
votes
2answers
402 views

Archive permalinks

This site has been very helpful for me in learning how to rewrite permalinks using add_filters to solve issues we were having when we merged two blogs into one. But, I do have one item I have been ...
5
votes
3answers
593 views

Taxonomy term in permalink

I have a big problem. I have been banging my head on this all day long. It seems to be a stupid easy question. Possibly also with a stupid easy answer. But I can't seem to find it. What I want is ...
5
votes
3answers
2k views

Use navigation path from menu for permalink

I now switched to permalinks and defined my own structure /%postname%. If I click on a menu item it takes the path from the parent page (hierarchy defined directly when editing a page). What I want ...
4
votes
7answers
12k views

How to use relative links on my pages?

In my web pages I want to use relative links instead of absolute links. However, pages do not allow php code inside them, so i cannot do to from a url in a relative manner. How does one get ...
4
votes
6answers
982 views

Can Wordpress realistically handle a site with 500 'pages'?

I'm building it from scratch and probably a 100 or so of those pages will be ecommerce. I would like to create meaningful, normal looking permalinks for aesthetics and SEO. I would really love to ...