Articles of permalinks

Permalinks – Different structures for different categories?

Currently I use /%category%/%postname%/ as my permalink structure. However, I would like to have a different structure for different categories. This is because I have a “News” blog that I would like to have organized by date like this – /2011/10/02/. But I have other categories where I do not want a date structure at […]

Specifying multiple categories in URL (permalink)?

For example: where dell and studio are categories A few months back I heard from someone that it is not possible. I need to know why? Which part of code prevents it? Is there any workaround for this?

How to reset canonical URLs / fix redirect loop

Couldn’t find anything in the related questions, so here goes: I have a post which, when viewed on the site, is returning a redirect loop. The error page is showing an address for the post that originated when the post was added to a category that was subsequently deleted. is the correct address, but […]

wordpress wp_list_categories

i’m using wp_list_categories like so: <?php //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) $taxonomy = ‘news_cat’; $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // […]

How do I fix permalinks for custom post types that has the same slug as a page?

I know that it’s impossible to have the same custom post type slug as a page. So, I thought it might be resolved in this way: ‘rewrite’ => array(‘slug’ => ‘my-category/!#’) for register_post_type But I get “Page not found” every time I visit /my-category/!#/title-1 As you understand, I also have a page named “/my-category”. Is […]

Change post permalink to external URL from custom field

I want to let my users submit links to my website something like reddit and digg. I added a meta_key ‘syndication_permalink’ which contains link to this post. How could I change the post permalink to link this custom link not to my page?

Clean install – Changing permalinks in twentyeleven give 404

interesting problem that I encountered, not sure if it’s bug or not.. On a clean install using the twentyeleven theme I try changing the Permalink Settings to something different from the Deffault and every post starts giving Page Not Found 404. The Pagination and the top Nav Menu also stop working. What needs to be […]

get the_title_attribute by id

I’m creating a list with a few permalinks which I call to with <a href=”<?php echo get_permalink($id); ?>” title=”…. And for the title I want to call the_title_attribute(). But it seems it can only be called within a loop, and not by id. How do I correctly get a title attribute? Note: The reason I […]

Confusion about how a URL is being parsed

I have a permalink that leads to some custom content like: That will take you to a page that is handled by the file: category-extra-deals.php On that page I grab the last portion of the URL (91103 in the above example) and use that to do a custom database request for the info I […]

Get closest page ID from URL

Lets say on my WordPress website I navigate to: In this case I am looking at a post in a CPT called News. What I want to do is get the page ID thats closest to that URL. I know the closest page ID can be found at: So how do I loop […]