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
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
599 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
597 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
976 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
193 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
36 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
76 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
1k 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
171 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
102 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
246 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
52 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
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
179 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
142 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
3k 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
662 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
1answer
4k 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
359 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
1k 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
2k 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
534 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
601 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
323 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
191 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
74 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
48 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
323 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
140 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
119 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
150 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/, ...
2
votes
0answers
144 views

How to remove slug from hierarchical custom types in 3.5.2

I know that is not suggested and that there is lots of discussion about this argument out there. Unfortunally, after a week of trying and tests, I have not managed to remove the slug from my custom ...
2
votes
1answer
483 views

Change in custom taxonomy permalink cause 404 error for another custom taxonomy

I have created hierarchy based custom permalinks with help of this link. But now it is causing 404 error on another custom taxonomy used in site. Although I want custom permalinks on this taxonomy ...
2
votes
0answers
77 views

Page Attachment Permalink Structure based on Menu Order?

I've been on a quest for the past couple of days reading up on Rewrite in WordPress but still can't seem to figure out how to accomplish this. When using pretty links in WordPress, media attached to ...
2
votes
1answer
204 views

add new permalink structure from dynamic page

I created page "play" url: http://localhost/myweb/play and inside of page "play" I include PHP code to make the new search from outside Wordpress. And all worked, if I search from my page "play" the ...
2
votes
1answer
100 views

How to specify URLS for custom posts & taxonomies

I've read a few posts about this, but can't find a clear answer :( I have a custom post type called {ondemand} Within the custom post, I have three taxonomies {speakers} and {categories} and ...
2
votes
1answer
339 views

Programmatically adding posts

I'm about to create parser which would be inserting new custom posts. So, it's pretty simple global $user_ID; $new_post = array( 'post_title' => 'My New Post', 'post_content' => 'Lorem ...
2
votes
0answers
319 views

get_permalink returns default link

I hope you can help me. So I'm using /%postname%/ as permalink structure, and my htaccess looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase ...
2
votes
2answers
112 views

Multiple instances of Featured Image Query

I have some custom code built into the header of my theme that gets the featured image from a post, displays the image and links to the posts permalink when clicked on by a user. The problem I am ...
2
votes
1answer
93 views

How to get full content including template HTML

I'm looking to get the page content between the header and footer (as Wordpress already does) that includes the template HTML (as this is going to be an AJAX request). Is there a function that will ...
2
votes
0answers
287 views

Best way to programmatically link to multiple categories (union/intersection) [closed]

This question assumes that you know about the various complex taxonomy queries available from the WP_Query API. I know about tax_query as well as about things like category__and, which allow you to ...