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)

1
vote
1answer
940 views

Change website URL without breaking links or images? WP 3.3

I am using Wordpress 3.3.2. Currently I am working on a website in a dev folder on my domain, dev.domain.com. Upon creating pages and blog posts, it just occurred to me that when I move the WP ...
1
vote
2answers
563 views

Custom Post Type: How to display all of same taxonomy?

Isn't there a permalink structure that will essentially list out all categories of a certain post type? function create_faqs_post_type() { register_post_type( 'faqs', array( ...
1
vote
2answers
2k views

How do I turn off 301 redirecting posts (not canonical)?

I noticed a strange behavior in WordPress where it automatically 301 redirects certain URL structures for posts. For example, I have a post entry for: mysite.com/999/about-us Then, you would think ...
1
vote
2answers
1k views

Can't change permalink url after hitting 'ok' and 'update'

I am trying to change some of the titles of my posts and their respective permalinks. After I edit the title and permalink and click 'ok', the permalink appears to have changed temporarily. However, ...
1
vote
1answer
277 views

Custom permalink structure

I have been digging the code for days and no solution. :( I have a Custom Post Type and two different Taxonomies. It is possible to achieve the following permalink structure (with add_rewrite_rule, ...
1
vote
1answer
81 views

How can you change the permalink for pages?

When I set my permalink to '/%category%/%postname%.html' this will work for all the posts, but the pages still don't have a .html at the end. Is there a way I can fix that?
1
vote
1answer
779 views

Custom post type permalinks giving 404s

I'm having trouble setting up permalinks for a custom post type. Below is the code from my init function: register_post_type('topic', array( ... 'hierarchical' => true, 'query_var' ...
1
vote
4answers
5k views

Category links suddenly started giving 404 errors

My Wordpress blog suddenly seems to have started giving me 404 errors when accessing category pages. For example, http://blog.rtwilson.com/category/tok-related/. Interestingly, this doesn't happen for ...
1
vote
3answers
700 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 ...
0
votes
1answer
86 views

get link of inserted media file of post within loop

inside the loop I would like to retrieve the URL of an inserted media file of each post. My attempt was: <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <a href="<?php ...
0
votes
1answer
46 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
2answers
136 views

Add category slug as class attribute in a link array

This incredible website and the genius developers here have helped me significantly in the course of my WP Dev over the years, firstly THANK YOU. I am now faced with a problem that I have been trying ...
0
votes
1answer
83 views

Root level category, tag, author and archive pages to work

I want root level Wordpress urls to work for category, tag, author and archive page. For example right now categories pages are. domain.com/category/cat-name/ it shows posts under cat-name ...
0
votes
0answers
37 views

set new link as permalink

i have external link stored in a variable $extlink which is generated based on different selections in the post. how do i set the permalink to be this $extlink so that when i click on the post it ...
0
votes
0answers
52 views

exec JavaScript using add_action when publish_post

How can I execute some Javascript code when an user publish a post I want to do something like this before publish a post: add_action ( 'publish_post', 'custom_links' ); function custom_links() { ...
0
votes
1answer
42 views

Custom Taxonomy List links being re-written

I am trying to show a list of terms from my Job Category. I tried the following: function job_listing_taxonomy_list( $taxonomy,$hide ) { $args = array('order'=>'ASC','hide_empty'=>$hide); ...
0
votes
4answers
289 views

Exclude subcategories from the url

We have a site with categories and subcategories. If anybody navigates to a content belongs to a subcategory the url will have the following form: domain/main-category/sub-category/mycontent/ But we ...
0
votes
1answer
159 views

WordPress Permalinks %postname% for RSS2 Feed URL

One of my client is developing a SmartPhone Apps with the WordPress site I've made for them. The site is of a daily newspaper's online version. All the news are sorted by different categories. So the ...
0
votes
1answer
265 views

How to create a permalink for custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

I found this link too much helpful. This is what I code so far and got it working for all scenarios except two scenarios. register_post_type( 'article', array( 'labels' => array( ...
0
votes
1answer
831 views

Custom Post Type nest under a normal WordPress Page

EDIT Again, nope it's not impossible, just nasty. Solution below. Trying very hard to get this working. Have tried numerous suggestions here on stackexchange/overflow My goals are to simply select ...
0
votes
1answer
113 views

Multiple Tags Issue in Permalinks

I have configured %tag% for permalinks in wordpress Here is How to use first tag in permalinks. But while posting multiple tags in a post i am facing a kind of problem.Suppose i have wrote three tags ...
0
votes
4answers
3k views

Permalink Issues by Installing WordPress in Subdirectory / Subfolder

I installed WP in subfolder /cms and it runs live without subfolder. When I use /%postname%/ as permalink I get 404 error on my site. My Server supported mod_rewrite. My Code wp-config.php ...
0
votes
1answer
348 views

custom naming of search permalink /search/

I found this snippet online … function search_url_rewrite_rule() { if ( is_search() && !empty($_GET['s'])) { wp_redirect(home_url("/search/") . urlencode(get_query_var('s'))); ...
0
votes
1answer
619 views

rewriting search-permalink with htaccess - search results are are “opened” automatically?

when typing "a" into my search field (/?s=a) I my search.php template is loaded and all results that match that letter are shown. If I add this to my .htacess … RewriteCond %{REQUEST_URI} ^/$ ...
0
votes
1answer
584 views

Multiple permalinks for a single post with multiple taxonomies

I created 1 custom post type (projects) with 2 taxonomies (clients / fields) to filter the results (like categories). At the end, it should be like this where project_name is the same custom post ...
0
votes
1answer
78 views

wordpress permalinks tweeks

I am getting following permalink structure after creating any post... http://domain.com/wp/postname As per Permalink Settings.... Post name: http://domain.com/wp/sample-post/ This permalink is ...
0
votes
1answer
92 views

Taxonomy based permalinks

With my website I work with my own taxonomy. And I want that the taxonomy is intergrated with the permalink. So if an news page has a taxonomy, the permalink change. Like this: ...
0
votes
1answer
122 views

Permalinks without subdirectories

Today I use: permalink_structure: /%postname% This gives me URL like this on my pages: #http://www.mypage.com/page1 #http://www.mypage.com/page1/page2 #http://www.mypage.com/page1/page2/page3 ...
0
votes
1answer
238 views

Rewriting permalinks with custom posts

I've created a custom post type, let's call it 'product'. The site is also bilingual, without any plugins, where I place localised pages under parent language pages, such as: English Page 1 Page 2 ...
0
votes
1answer
1k views

Rewrite on custom post type permalink not working?

My theme has a custom post type called 'portfolio'. I want the url to display 'projects' instead. I've change the rewrite on the register_post_type function to 'projects' but it doesn't change the ...
0
votes
1answer
281 views

rename 'page' URL fragment in pretty permalinks

i would like my WP URLs to be fully in my language so instead of: site.com/page/2/ i would like to have: site.com/pagina/2/ (in spanish) how can i accomplish this? i tried to do simple str_replace ...
0
votes
1answer
329 views

Should I use relative or absolute urls when pointing to internal pages

This is a simple question, that's probably been asked before. For internal links between pages, is it better to use a relative link or full permalink? Thank you.
0
votes
2answers
157 views

Permalinks for quote authors

What I have: A site of quotes with format: "Quote text." -Quote Author See quotup.com for my test website (my apologies in advance for the testing-profanity). What I'm after: Clicking "-Quote ...
0
votes
3answers
520 views

How can I create a permalink with two categories, with the order based on the parent category?

Basically, I'd like to create a category permalink like example.com/books/adventure without having to make adventure a child-category because it will apply to other categories as well. So the end ...
0
votes
5answers
1k views

How does one flush rules on theme activation or deactivation only?

Flushing rules is clearly an important part of creating themes with custom post types. See here and here. Does anyone have any example code of how to flush rules from functions.php? I'm a little ...
-1
votes
1answer
32 views

permalinks has -2 with post name structure. why?

I have set permalinks structure in my website as post name, then it supposed to come as: http://example.com/newsite/page-name/ but it is coming as: http://example.com/newsite/page-name-2/ I dont ...
-1
votes
3answers
1k views

PHP code for link with text

I was exploring and ran across this post: Grab First Link From A Post, Grab First Blockquote I would basically like to do the same thing, but have it call not only the URL but also the link, since I ...