driz
driz

Reputation: 11

WordPress Category Hierarchy

I'm using categories to construct my portfolio in this way:

Portfolio has an ID of 4, Web is 23, Animation is 27, and Print 31.

I have my URL's set /%category%/%postname%/ in the Permalinks, but when I add a post to say both Portfolio and Animation it won't show the /animation/ in the URL because Portfolio is a lower ID than Animation. How can I tell WordPress to ignore this? I'm sure I saw a plugin somewhere but can't remember where. The only other fix would be not to choose the parent category for the post and only choose the child, but this too has its problems.

Any ideas? I'm pretty sure there is a plugin, but I'm open to ideas.

Thanks

Upvotes: 1

Views: 2546

Answers (4)

Mostafa Maklad
Mostafa Maklad

Reputation: 347

You can try this code

<?php 
$category=get_the_category(); 
echo get_category_parents($category[0]->cat_ID , TRUE, ' &raquo; '); 
?>

Upvotes: 0

Dominic
Dominic

Reputation: 2437

Hikari Category Permalink is a fork of sCategory Permalink.

Red permalink links appear on mouse-over in the categories box which let you define the category to be used in the URL.

The example would result in something like: my_site.com/category/ciencia/my_post

Example

Upvotes: 0

Eduplessis
Eduplessis

Reputation: 161

I think the best way to do what you want it's to transform your post to page.

Take your page:

  1. Portfolio
    • Web
    • Animation
    • Print

Upvotes: 0

Wil
Wil

Reputation: 2358

I think you are looking for this.

http://wordpress.org/extend/plugins/scategory-permalink/

Upvotes: 1

Related Questions