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 ...
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 ...
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 ...
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 ...
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' => ...
1
vote
2answers
3k views

paginate_links() don't properly work in search.php?

I'm using this in my search.php template … <div class="pagination"> <?php echo get_pagination_links(); ?> </div> And this is the function … function get_pagination_links() { ...
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 ...
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 ...
3
votes
1answer
4k views

Remove parent category from permalink? Basically only have the child category?

I think there used to be an out-dated plugin to do this. Is there any way to do this easily with just a little code? We prefer not to rely on a plugin since that makes us dependent on the developer ...
3
votes
3answers
2k views

Need help with friendly URL's in Wordpress

I'm creating som custom templates in Wordpress and I'm passing some data in the URL's. Currently my URL looks like this: http://www.mysite.com/designers/?id=43&name=designer+name The URL ...
2
votes
2answers
5k views

Using $_GET variables in the URL?

I need to generate a simple error message on a page by passing a variable through the URL. The URL is structured as follows: http://site.com/parent-category/category/?error=pause I'm sure it's the ...
1
vote
2answers
610 views

Permalinks: custom post type -> custom taxonomy -> post

I am having trouble working with wordpress' rewrite rules, and could use some help. I have a custom post type called shows. All shows have a single custom taxonomy category show-category. A show ...
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 ...
4
votes
1answer
7k 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
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 ...
3
votes
1answer
2k views

Pretty URL with add_query_var

I'm trying to add a 'sub post' to each post on my site, eg site.com/product-one/changelog site.com/product-two/changelog site.com/product-three/changelog This is the code I'm using atm, which I ...
5
votes
1answer
815 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 ...
2
votes
2answers
392 views

Getting archive pages in WP's AJAX internal link finder?

I often need to link to custom taxonomy term archive pages and would love to be able to do so through the AJAX internal link navigator added to the visual editor in 3.1. Is there any way to get this ...
1
vote
2answers
2k views

Permalinks in Custom Post types

Is it possible for a custom post type to have a permalink as domain.com/custom-slug/ instead of domain.com/custom/custom-slug/? I can't seem to achieve it. rewrite argument while registering it ...
2
votes
1answer
3k views

Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT

Wondering if someone could tell me why sub pages (child pages) no longer work (eg: www.mysite.com/type/childpage). I have a page called "Type" (working fine), and I wish to have Child Pages of "Type" ...
2
votes
2answers
1k views

Remove parent slug for child pages

I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink. Something that automatically changes the permalink for child pages. Example: ...
2
votes
2answers
2k views

%tag% in permalink not working

I use custom permalink structure: /%tag%/%postname%/ and it is not working. I get url - http://mydomain.com/%tag%/post/. So there is no tag name, just %tag%. If i place %category% instead ot %tag%, ...
1
vote
1answer
144 views

Publish Post After Click On A Link

I have a frontend posting form (CF7), where user inputs (among other data of course) his email. Now I set the status to pending. What I want is, that the user would get trough autoresponder a mail, ...
1
vote
1answer
170 views

Change post permalink to external URL from custom field

I want to let my users submit links to my website something like reddit and digg. I added a meta_key 'syndication_permalink' which contains link to this post. How could I change the post permalink to ...
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 ...
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 ...
3
votes
2answers
494 views

Custom post types - Use post_id in permalink structure

I'm registering my CPT like so: $args = array( 'labels' => $labels, 'public' => true, 'hierarchical' => false, 'rewrite' => array( 'with_front' => false, ...
3
votes
1answer
9k views

How to rewrite URI of custom post type?

The site that I am working on uses the following "pretty" permalink structure: http://example.com/blog/my-special-post But for a custom post type my client would like to avoid having a "pretty" ...
10
votes
3answers
563 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 ...
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', ...
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 ...
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
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 ...
3
votes
1answer
881 views

Custom post types - Use post_id in permalink structure when using has_archive => true

I recently asked this question Custom post types - Use post_id in permalink structure and solved it but as I have enabled 'has_archive' => true the solution given no longer works. Let me explain: ...
4
votes
1answer
234 views

Dynamic taxonomy in permalink made all other posts NOT FOUND?

I added my taxonomies in the permalink instead of the Custom Post Type's slug, and it works fine. I'd even say everything was working fine but changing the WP installation to Multisite broke all other ...
4
votes
1answer
506 views

Rewrite rule for Custom post type Monthly and Yearly archive

I have a custom post type "contest_recipe". I can view contest recipe posts by year and by date with the following urls: http://example.com/2011/?post_type=contest_recipe - shows all 2011 contest ...
3
votes
1answer
199 views

Remove unwanted part of permalink custom structure from CPT url?

My site currently has regular posts (in a section called "Trend Watch"), as well as a Custom Taxonomy (called "Region"). My permalink settings have this Custom Structure: ...
3
votes
4answers
4k views

URL Rewrite + Page + Custom Post Type = Unusual Redirect

Yet another URL rewrite issue :) The Problem I have a URL rewrite rule that should work, but against all logic it redirects without passing the query var. The Juicy Details The site has a page ...
3
votes
1answer
1k views

Rewrite permalinks for custom posttype and custom taxonomy

How to rewrite permalinks for a custom posttype and custom taxonomy? I have a custom taxonomy: region, and a custom posttype: business. Now, how to rewrite the permalink, so that for a category, ...
2
votes
2answers
2k views

How to replace “wp-content/blogs.dir” with “media” for attachment permalinks?

How to replace "wp-content/blogs.dir" with "media" for attachment permalinks in a multisite environment? This is how links look now: ...
0
votes
1answer
137 views

Semantic URL Custom Post Type and Taxonomies permalinks

I have created a custom post type with custom taxonomies. Now I need help with the permalinks. Now is like that: custom post type archive: example.com/custom-post-type/ taxonomy archive: ...
3
votes
2answers
389 views

Custom post type 404s with rewriting even after resetting permalinks

I created a custom post type, of which the (simplified) arguments are: register_post_type( 'Event', 'public' => true, 'rewrite' => array( 'slug' => 'eventy'), 'has_archive' ...
3
votes
5answers
2k views

Remove slug in taxonomy url

Just wondering, how can remove slugs from some URLS. I'm using a custom post type called exhibitors, and some taxonomies to define those exhibitors (eg: featured-guests, publishers etc.): Right now ...
2
votes
2answers
306 views

Different permalink for posts and authors

I tried to avoid ask this question, because I think that must be simple, but after long hours trying to get an answer I cant achieve it. I am trying to get a permalink structure like this: ...
2
votes
1answer
240 views

Change link to other post to shortlink in the editor

Curently if we use the insert link dialog to insert a link to another post, WordPress always use the permalink of that post. The problem is when we change permalink structure, that link will be ...
2
votes
1answer
1k views

Permalink rewrite with custom post type and custom taxonomy

I think thats a quick one: I've got: Custom post type: Food Custom taxonomy (Registered to Food): Fruits Terms in Fruits: Apple, Orange, Cherry If I type in example.com/food?fruits=Apple,Cherry, ...
2
votes
3answers
317 views

Must permalinks always point to single post pages?

Suppose that I have a blog with few posts per month, and no comments, and I don't want to show posts in single post pages, but always "in context" (say, together with the posts in its month - or ...
2
votes
1answer
3k views

How to change permalink structure for custom post type and it's taxonomies?

This is a repost of an earlier question I had, but I like to go into more details now to be able to fully solve this. So again, with (normal) posts changing the permalink is as easy as going to ...
2
votes
1answer
540 views

Custom Post Type: Get most recent permalink

Stupid question, I bet: I'm doing a website for an artist where I have a custom post type of "Painting". How do I get the permalink of the one added most recently?