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
764 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
673 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
2answers
34 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
0answers
30 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
48 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
39 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
3answers
203 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
131 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
236 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
739 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
110 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
280 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
545 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
562 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
74 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
85 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
121 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
224 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
253 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
296 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
154 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
483 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
3answers
857 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 ...