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)

25
votes
4answers
7k 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 ...
21
votes
3answers
27k 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); ...
18
votes
1answer
16k 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
3answers
4k 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 ...
15
votes
2answers
13k 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 ...
14
votes
2answers
7k 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
7answers
6k 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' => ...
10
votes
3answers
562 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
2k 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, ...
8
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 ...
8
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
4k 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
1answer
10k 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
2k 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
374 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
2answers
836 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 ...
6
votes
3answers
3k 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
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
4answers
2k 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
2answers
93 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
390 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
1answer
123 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
144 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
616 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
810 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

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
3k 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', ...
5
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 ...
5
votes
1answer
804 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
3answers
721 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
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 ...
5
votes
3answers
326 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
2answers
5k 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
222 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
130 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
267 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
3answers
438 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
1k 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
10k 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
878 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 ...
4
votes
2answers
306 views

My permalinks are broken! Can I use mod_rewrite to ignore a physical file?

A website I work on recently posted a file at the root of their website named "2011.html." Now, any 2011 blog posts with the permalink structure of year/month/day/post-name do not work, and instead ...
4
votes
2answers
3k views

Wordpress slug issue with non-latin characters

I'm using permalinks in WP as: domain.com/category/post_name The issue is that post names have non-latin characters such as chinese, hebrew, and arabic. So it encodes them to something like: ...
4
votes
1answer
3k 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 ...
4
votes
1answer
96 views

When creating a WordPress page, a “-2” suffix is added to new pages' permalinks

I have noticed after deleting an original page in WordPress with lets say a permalink of your_domain.com/contact/ and then trying to recreate the same page with the same name/slug, my WP is generating ...
4
votes
2answers
451 views

the_title() and the_permalink() won't work on AJAX calls

I've run into a strange problem. I have a custom loop built with get_posts that works fine when loading the page normally: <?php $rows = get_posts(array( 'post_type' => ...
4
votes
1answer
62 views

How to i18n slugs for templates?

some templates are chosen from WordPress based on slugs (e.g. category-{slug}.php). Problem: How can I use the same template for an i18n'ed slug? Example: I have a category-news.php and an english ...
4
votes
1answer
726 views

Does WordPress automatically do 301 redirect if I change permalink

I don't know how to check this but it seems to do the redirection when I change the permalink structure.