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
361 views

Mass Permalink Changer

I recently converted a site from Moveable Type to WordPress and noticed that the permalinks for each post are short, cut off and have underscores in them. What I am looking to do is if there is a ...
2
votes
1answer
576 views

custom taxonomy archive permalink shows 404 error

In my plugin I have a custom post type with a slug of 'ready-to-wear' and I have a custom taxonomy called 'seasons' associated with it. The odd thing is that this url with query works: ...
2
votes
2answers
130 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
2answers
1k views

Custom permalink structure only for default posts

Does anybody know how to modify the url struct only for the single post page? When I go to a post page, the url should look like: example.com/xxx/my-post. All other urls (with the exception of the ...
2
votes
2answers
628 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
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
336 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
485 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
567 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
318 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
187 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
37 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
1answer
110 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
88 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
129 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
1answer
249 views

Menu Link Redirect Based on Username or User ID

I am building a client portal where my clients can log in and see all their pending projects, completed projects and create new projects. Though I'm stuck at the start. The dropdown menu is called ...
2
votes
0answers
73 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
180 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
99 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
2answers
353 views

Make post slug have priority over category slug

I have a wordpress site where the category base is stripped from the url. Now, when a category has a certain slug that's similar to a post slug, the category is shown. I would like to show the post ...
2
votes
0answers
256 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
100 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
85 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
245 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 ...
2
votes
0answers
112 views

Change Permalink Structure for Custom Taxonomy [duplicate]

I have a custom taxonomy called colors, which contains the terms Red, Blue, Yellow etc. Each post has a term of the taxonomy colors linked to it. The default permalink structure for posts is ...
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
1answer
230 views

wordpress custom post types and permalinks

I have a custom post type called Content, that has a capability type of 'page' and is set to 'hierarchical' => true. I have two pages with the same name "Children", but they have different parents. ...
2
votes
1answer
61 views

After updating a page, all pages on the site used the index.php template

I am having a strange problem with a site I am currently building. I will try to give as much detail as possible in the hopes that somebody is able to figure out what is causing this :) Overview of ...
2
votes
2answers
7k views

Multi-language permalink in qtranslate

I am using qtranslate plugin for my WordPress site to make it a multi-language site. Now I have got a requirement like For English the url should look like www.sitename.com/contact-en For French the ...
2
votes
1answer
331 views

How to change author base without front

I am currently using this code: function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = 'connect/member'; } add_action('init','change_author_permalinks'); ...
2
votes
0answers
409 views

Custom attachment permalink structure [closed]

I have 10 images attached to each of a custom post type. My permalink structure for the custom post type is: example.com/post-type/post-title I am using the Wordpress Attachments plugin. My ...
2
votes
2answers
1k views

custom taxonomies on permalink

is it possible to bring custom taxonomies to permalink? currently my permalink is looking something like this /%postname%/%category% but i also want to add custom taxonomies to ...
2
votes
1answer
202 views

Custom taxonomy on permalink

I have a long time problem and look forward for your help. I have a custom taxonomy of "city" (it is no hierarchical like tags). I just would like my URLs to look like this: ...
2
votes
3answers
882 views

How to make variables in URL look like the permalink structure?

I've been looking for the answer to this everywhere but with no success and that's why I'm asking here. I don't even know if the question is the right one. In any case, I'll try to explain. I have ...
2
votes
2answers
80 views

When is it a good idea to build a permalink structure from scratch?

Is it a good idea to design a permalink structure from scratch? The requirements to the structure are as follows: Pages to be referenced by their structure ...
1
vote
3answers
609 views

single-type.php not working, delivering 404

I've created a custom post type, and have successfully added a few entries. I can call these entries out with query_posts() to show on the front page, but the_permalink() on each of them just sends me ...
1
vote
2answers
2k views

URL rewrite based on a custom field value

I'm working on a migration from another CMS to WordPress. The old site had terrible SEO-unfriendly URLs in the format http://example.com?lid=1234. We have imported all the posts from the old site ...
1
vote
3answers
589 views

How to call a plugin function from index.php

I have created a function in my plugin myplugin with the name foo, how to call it from the frontend? e.g. index.php?
1
vote
1answer
2k views

Custom post type permalink endpoint

I have a custom post type called "destinations" and I have set the EP mask for the post type to default EP_PERMALINK. I have added a couple of endpoints as follows : add_filter( 'query_vars', ...
1
vote
3answers
572 views

Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?

I am having a bit of a strange issue with rewrite rules not flushing properly. I have tried using flush_rewrite_rules(); and flush_rewrite_rules(true);. I have also tried globalizing $wp_rewrite ...
1
vote
1answer
1k views

Function to get permalink of custom post type archives?

Is there a function that will return the permalink to a custom post types archives that is available to use in WordPress? Something like: get_cpt_permalink("events") which will return ...
1
vote
3answers
1k views

Category archive by year with permalink support /category/YYYY

I am currently looking at creating a new type of site archive within WordPress that allows users to filter by category AND by year rather than the default category OR year. I am hoping to build a ...
1
vote
4answers
551 views

How can I force WordPress to redirect to canonical permalinks?

In WordPress 3.1 a post can be reached a number of ways, for example each one of these takes you to the same post (where /id is the base) http://myblog.com/id/1008 http://myblog.com/id/1008/my-slug ...