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
4k 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
912 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
433 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
342 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
494 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
3k 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
62 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
2k 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
602 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
3k 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
608 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
1k 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
345 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
39 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
86 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
2k 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
1answer
189 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
104 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
396 views

Social sharing post's shortlink instead of permalink

Is there a way to force a social sharing plugin to use the shortlink each of my WP posts automatically gets (YOURLS service in my case) to pass to the social service the visitor clicked, instead of ...
2
votes
2answers
271 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
54 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
188 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
2k 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
188 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
2answers
148 views

Getting links to work the same on development and production

I am working on a website where I am specifying links to pages within my site in other pages. I am using the same permalink post name structure i.e. http://example.com/sample-post on both development ...
2
votes
1answer
4k views

Permalinks for custom post-types within custom taxonomies not found

I have tried to apply the advice offered by TheDeadMedic in this post to achieve the following URL structure: example.com/activities = a WP page example.com/activities/type-term = a custom archive ...
2
votes
3answers
2k 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
677 views

Custom post type hierarchical permalinks not behaving as expected for parent/child pages

When you have Pages with children, the permalink structure works something like this: example.com/parent-page/child-page/ All well and good. Trying to go to this URL: example.com/child-page/ ...
2
votes
1answer
2k views

Custom post type's get_permalink returns wrong url

Currently my permalink setting is /paper/%postname%/. I am developing a plugin, so the following is done during the activation. I am programatically adding a new custom-post-type called 'meta', like ...
2
votes
2answers
5k 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
373 views

Can't get rewrite rules working

Basically I want to rewrite: /edit/test-post to an existing page with a parameter: /edit?e=test-post From the examples in the Codex I created: add_filter( ...
2
votes
2answers
2k views

How to change the category in URL for posts in multiple categories?

How can I change the category slug that appears in the URL of a post that's in multiple categories? I'd like to change the default WordPress behaviour of using the category with the lowest id. I ...
2
votes
2answers
3k views

Custom Post Type Permalink / Rewrite not working immediately

Hitting a brick wall with the following: I have: 1 custom post type called cpt_community 1 custom taxonomy called tax_community If I set 'rewrite' => true in my CPT registration, then ...
2
votes
3answers
561 views

Wordpress rewrite my URL when i use pagination

I've just created a rewrite rules to integrate pagination in my page music (displaying custom post_type "music") in order to : 1. displaying a specific page from a long musical playlist. 2. in this ...
2
votes
1answer
1k views

Extend the wp_get_archives output with '?post_type=foo'?

I've gotten my custom post types to display as it should in date based archives; the structure example.com/year/month/day (and above) works properly as long as it's extended with ...
2
votes
1answer
619 views

Custom rewrite rules for a $_GET request

Assuming I have this URL: http://site.com/?get=something How can I change it to a nice URL that looks like: http://site.com/get_something using WP's URL rewriting system?
2
votes
1answer
1k views

Get a permalink structure of /%posttype%/%category%/%postname%

I have a custom post type named Reportage, added in functions.php: add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'reportage', array( ...
2
votes
2answers
1k views

permalink changed, now getting 404 for every pages

i have my website with permalink, till now everything was fine, but few days before i changed my permalink, now everything is going wrong, now each and every page i am getting 404, even my about-us ...
2
votes
1answer
326 views

Add filename to attachment page url

I wan to change my premalinks to attachment pages from http://example.com/.../attachemnt/something to http://example.com/.../attachemnt/something/something.jpg It should simply add filename but with ...
2
votes
1answer
196 views

Changing my permalink structure - will new layout conflict with existing page?

My site has a blog page at /blog/, with links to blog posts. A post will have a URL starting at the root of the site, which is a bit jarring. I'd like to have the posts URLs appear as if they are ...
2
votes
1answer
78 views

How to achieve a clean custom permalink solution?

I am working on the design of a blog with the below(just a sample) category hierarchy. PARENT | ...
2
votes
1answer
40 views

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I ...
2
votes
0answers
18 views

Migration from Squarespace to WordPress: Remove leading 0 from %monthnum% in permalinks [duplicate]

I need my WP permalinks display months without using any zeros in the URL i.e. /1/ instead of /01/ for January. I'm moving my blog from Squarespace to Wordpress and I obviously want to keep all my ...
2
votes
0answers
55 views

Plural Category Base Slug On Category Archive Page

I've got a little problem with the category base slugs. Say I have got a category called 'Resources', with the category slug set to 'resource'. So any post in the category resource will appear with ...
2
votes
1answer
577 views

How to get pretty URLs with add_query_arg in permalinks

With add_query_arg() it is nice to add additional parameters to an URL and it is also easy to create a rewrite rule. So far so good. But the problem is the URL replacement done by wordpress. When I ...
2
votes
1answer
31 views

How to 301 all posts

I am currently using domain/%postname%/ but I am looking to change it to domain/folder/%postname%/ - I unsure how to 301 all posts. If I was to use something like Redirect 301 /$ domain/folder/$ I ...
2
votes
1answer
153 views

Problem duplicated shortlinks bitly

I've this plugin to create shortlink using the bitly API, but there's a problem! function yoast_bitly_shortlink($url, $id, $context, $allow_slugs) { if ( ( is_singular() && !is_preview() ...
2
votes
1answer
131 views

Regex in add_rewrite_tag not accepting OR operators?

I am trying to add a custom field to the post permalinks by using a combo of add_rewrite_tag and applying a post_link filter. What I am aiming for is something like this: ...
2
votes
3answers
161 views

Wordpress within specific sub-directories, implicitly not root

I have an existing application running at my website root now. Using .htaccess, would it be possible for a single Wordpress installation to manage sub-directories? For example, /press/, /careers/, ...