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)

2
votes
2answers
2k views

Get Permalink without domain (i.e. get relative permalink)

This is the code I am using: <?php echo str_replace( home_url(), '', get_permalink($post->ID) ); ?> What it does is output the permalink as a relative URL i.e. only the slug. For instance, ...
2
votes
2answers
568 views

Adding meta values to permalink

I have publications and I want to simply add year and month to the permalink. Currently the year and month of publication is added to the post as a meta value. I've set up publications as a custom ...
2
votes
2answers
237 views

Random post permalink

I want to make a random permalink for each new post. For example when an author creates a new post, he gets this kind of permalink automatically: http://mysite.com/x5Kvy6 (like bit.ly). But I want to ...
2
votes
3answers
489 views

flexible rewrite 'ramble' URLs with Wordpress

I want to access my post with id 17 like this: http://localhost/archives/17/moot-bla-foo-ramble In other words, the id shall decide, everything thereafter may (or may not) be the slug or anything ...
2
votes
1answer
3k views

Why is “/page/2/” not working?

Finally got pagination to work with the below code, but now the pagination links to /videos/page/2/, which doesn't exist. How do I get page 2 to work? <?php $temp = $wp_query; $wp_query= null; ...
2
votes
1answer
66 views

What Defines What Category A Post Picks (if in multiple)

If I have a post in multiple categories, what defines what category shows up in the URL? Assuming I have permalinks setup as /%category%/%postname% is it the ID or the name?
2
votes
4answers
1k views

Using only %postname%

So I see everyone's arguements against using this, but that seems like a huge flaw in Wordpress because a domain name as close to the root is crucial to a site's SEO. I want my site which has rough ...
2
votes
2answers
30 views

Migrating Wordpress blog to New Webhosts, something is adding a # and gibberish

I just migrated a WordPress blog from one host provider to another. Did a clean install on the new server, and everything seems to be working fine except all the permalinks for some reason add a ...
2
votes
1answer
1k views

How would I create a different permalink structure for pages and posts?

Right now I have pages like "about", "resources", etc and the urls are /about and /resources with a custom permalink structure as /%postname%. For "news" section it's the posts and it's at /news and ...
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
541 views

Get Permalink of Network Blog Post

I am trying to write a function that will allow me to specify a post ID and a blog ID, and then have it return the permalink and title of the blog post. I need this to be efficient because the ...
2
votes
1answer
649 views

Nice RSS Feed URLs for each custom post type

By default WP seems to display all posts of all types in the main RSS feed. You have to add a post_type query variable to show post of a certain type... So how can I turn this: ...
2
votes
2answers
637 views

How to change “permalink” structure in “Wordpress Thesis” theme?

I have installed Thesis theme. The default permalink structure is BLOGURL/%postid%/ When I change it to BLOGURL/%postname%/, I can't access the pages. I have modified .htaccess file and the "nav_bar ...
2
votes
4answers
2k views

Remove Custom Taxonomy Base

I am using custom taxonomies with WordPress 3.0.4 I am wondering if anyone knows how to remove the taxonomy base from the URL? I have seen plugins that do it for categories and tags, but not for ...
2
votes
2answers
991 views

Search result permalink

how to make permalink available for search result page /?s=one+two+ok to /search/one-two-ok/ thank
2
votes
2answers
212 views

Resolve a custom post type name vs. page permalink conflict (same slug)

I have a custom post type called "visningshus", and also a Page with that slug. This is as it should (must) be. Currently, "http://my-site.com/visningshus" lists all posts of that type. I want to ...
2
votes
1answer
50 views

Permalink Settings: optional settings doesn’t apply to editor

In my WordPress 3.8 in my "Permalink Settings" I've chosen the option "Post name". Then I've added "Optional" for "Category" ( %category%/%postname% ), the URLs works like I wanted - ...
2
votes
1answer
103 views

How to assign a Permalink to a Function

In Drupal, you can assign a URI to a function that gets called, like this: function mymodule_menu() { return array( 'custom_uri' => array( 'page callback' => ...
2
votes
1answer
780 views

Setting 404 page in Nginx

I am using this page (http://wiki.nginx.org/WordPress) to setup my WordPress on a nginx/php-fpm server. Everything is okay, except the 404 page When I request www.example.com/foo, it send me the ...
2
votes
1answer
162 views

custom post type permalinks with category and tags

I have a custom post type called 'designs' and have registered taxonomy 'design_category' and 'design_tag'. I'm trying to get the permalinks as follows but not having much luck - seems having 2 ...
2
votes
1answer
113 views

Custom Post Type “Event” with custom permalink structure

I need some help about Custom permalinks for custom post types. I have created a custom post type called "evento" and 3 custom fields for storing date, month and year of the events. I would like to ...
2
votes
1answer
79 views

How to get wordpress link to fully evaluate when coming from facebook

The short version: Any link from Facebook to a page stops evaluating at the "hardcoded page" in the wordpress press install, ignoring the remaining parts of the URL. It doesn't allow the shortcode ...
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
2answers
3k views

Removing taxonomy base using WP rewrite

I´m trying to create the following URL structure: example.com/attractions <-- post type archive example.com/attractions/taxonomy_term <-- taxonomy archive ...
2
votes
2answers
842 views

Removing /blog/ from multisites cause infinite redirection

I have a wp installed with multisite enabled and working with subdirectories. I noticed that in the main blog (the one that exists by default on the root), the posts links had a "/blog" in the url ...
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 ...
2
votes
4answers
305 views

Nicest way to 301 Redirect traffic when changing permalink settings

If I change my permalink structure, is there is a nice way to handle when people/bots go to the old structure? I presume I can add use .htaccess and write a rule to redirect based on a 301 but is it ...
2
votes
1answer
453 views

custom permalink/shortlink with base62 encoded post ID

I want my post-links to look like /%post_id62%_%postname%/ where %post_id62% is the post ID in base62 encoding (e.g. http://example.com/y9Rlf_test/) and my shortlinks to consist of /%post_id62% only ...
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: ...
2
votes
1answer
61 views

Adjust which tempalte a page uses with a function?

I know if I had a page that had a permalink such as /stories/ then I could create a page in my template called page-stores.php and it would load in place of the default page.php when that page loaded ...
2
votes
3answers
2k views

Multiple post types - share same ReWrite slug?

I've run into another wonderful 404 issue. I'm trying to have 2 seperate post types that share the same rewrite slug. I've flushed my rewrite rules, and when I test only 1 of the CPT works- the ...
2
votes
1answer
1k views

Custom post type permalinks breaking due to 3.1 bug fix

So I just updated a site to 3.1 that uses several custom post types. When I had made the site I had not noticed at the time the $post_type parameter for register_post_type has to be in all lowercase ...
2
votes
1answer
594 views

WordPress 3.1 not compatible with jQuery Mobile?

I recently updated to WordPress 3.1, and with that update, something very interesting happened. Links became unclickable -- clicking on any link would literally result in nothing happening. ...
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%, ...
2
votes
1answer
565 views

Different permalink structure per category

Just for curiosity, is it possible to have a different permalink scheme for different templates or categories? For example, for post "XYZ leach review" in category pets/dogs to have ...
2
votes
1answer
894 views

Change of permalink structure - redirects in htaccess breaks the archive links

When I started with my blog, the permalinks and following structure: http://<domain>/%year%/%monthnum%/%day%/%postname%/ Some time ago, I changed the permalink structure to ...
2
votes
1answer
86 views

Add specific word to default page permalink

Right now I am working on one of my client's project. Its all about amazon product display. My client wants me to change the permalinks of all posts, pages, serch results, archive pages, ...
2
votes
1answer
34 views

How to find out who handles a permalink?

My previous question isn't faring too well. I guess it may be too specific. Let me approach the problem from another direction. There's an URL within my Wordpress site. It's occupied - sending the ...
2
votes
1answer
60 views

Multisite wordpress and subdomain URL collisions

I have a multisite WordPress installed on a server using a domain, site.com and I have a subdomain setup in WordPress, so subsites are at sub1.site.com, sub2.site.com etc. In addition to this, the ...
2
votes
1answer
653 views

How to Display ACF Relationship Custom Field as Link to Specific Custom Post?

OK. I am reading this ACF tutorials, but I am not getting into this. I have 2 post types: Lists and Contacts. Every List must be related to some Contact, and I use Relationship custom field type ...
2
votes
3answers
503 views

Why would Numeric permalinks work, but %postname% won't?

[Question edited as I discovered more] I have a weird problem, in that my permalinks do not work. Well actually, it works when the permalink-structure is set to something which begins with static ...
2
votes
1answer
154 views

How to use author id in post permalink

Currently, Wordpress supports author name in the post permalink by using %author%. Is it possible to add the author id to the permalink? For example, changing this: ...
2
votes
1answer
94 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
2
votes
2answers
179 views

Change permalink for a single post type only

At present I'm using this permalink structure /%category%/%postname%/. There are some existing post type. I want to change permalink for image post type to image/%post_id%/, and don't want to affect ...
2
votes
1answer
49 views

custom post type default permalink

Is it possible to use the permalink structure defined in the Wordpress settings panel for custom post types? And if so, how do I do that? I currently have: function add_posts_two() { $labels = ...
2
votes
1answer
179 views

New categories are now going to 404s

I have a WPMU site with hundreds of blogs on it. We are on 3.4.2 and this is the first time I'm seeing this issue within a few of my sites. Basically, what happens is that I'll create a new category ...
2
votes
2answers
1k views

Redirect old permalinks to new permalinks

I changed the permalink structure from /%category%/%postname%/ to /%year%/%monthnum%/%postname%// How can I redirect all old posts to the new ones (eg: via htaccess)?
2
votes
1answer
126 views

Some posts returning 404 instead of displaying post

I'm having a problem with my Wordpress install. All of a sudden some of my posts return 404 errors when I try to go to their permalink. My post names are all numbers and this started happening when my ...
2
votes
1answer
153 views

Removing leading zeros from custom permalink structure

My WordPress website currently uses this custom permalink structure: %author%/%year%/%monthnum%/%day%/%postname% In this case, %monthnum% instantiates numbered dates with a leading zero -- e.g., "09" ...
2
votes
1answer
499 views

How to achieve this permalink -> category-name/custom-post-type-name/post-name

I am trying to use categories to provide the structure for my site. I will create sections on my site called England, Wales, Scotland and Ireland . These will be categories. My posts will use custom ...