Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] custom order of cats and tags (http://forum.bytesforall.com/showthread.php?t=2446)

jankph Jul 15, 2009 07:11 AM

[SOLVED] custom order of cats and tags
 
Here's an idea. I'm not sure it's even possible:

I would like to order my postinfo categories and tags in a certain order. By default it's alphabetically, but it is possible to make it custom? My vision is a field in the Atahualpa post options when I am editing/writing the post, where I can enter cats and tags in the order (by ID) I want to display them, e.g. 'Enter categories to display: 312,567,886,...' It's just about structuring my cats and tags so it's easier for my readers to find related cats and tags. Or is this already possible today, via php?

wmoura Jul 15, 2009 06:24 PM

jankph,

I don't know how to order the tags, but for the categories I've been using "My Category Order" plugin with Atahualpa 3.4.2 and WordPress 2.8.1 and it works very well.

Flynn Jul 15, 2009 08:35 PM

Technically possible yes, but that a bit very specific I'm afraid. I wouldn't mind adding it to post info items once the todo list is shorter however I wouldn't want to make the Write Panel too crowded since many users probably wouldn't use this.

jankph Jul 16, 2009 12:06 AM

Quote:

Originally Posted by wmoura (Post 10422)
jankph,

I don't know how to order the tags, but for the categories I've been using "My Category Order" plugin with Atahualpa 3.4.2 and WordPress 2.8.1 and it works very well.

Doesn't that only work for the category bar? That's not an issue. It's the postinfo I want to order.

jankph Jul 16, 2009 12:12 AM

Quote:

Originally Posted by Flynn (Post 10436)
Technically possible yes, but that a bit very specific I'm afraid. I wouldn't mind adding it to post info items once the todo list is shorter however I wouldn't want to make the Write Panel too crowded since many users probably wouldn't use this.

The reason for asking is that my blog posts are very often about published research papers. I use categories for the main topic(s) of the paper and tags for the name of the authors and more specific keywords within the paper. Here it makes sense to list the name of the authors first and then the keywords. It just looks more clean and structured. With an alphabetical listing like now that is not possible.

I do agree that it will crowd the Write Panel and maybe be too much of an overhead for something most people have simply accepted as that's the way blogs are.

Anyway, thanks for taking note.

lizenkohlhaas Jul 20, 2009 04:58 PM

i got the solution for "custom-order-tags":

1.) in db > wp_term_realtionship > term_order change to primarykey and autoincrement and standard nothing. (delete the 0) to do this, because of primary / no double numbers, you have first to delete complete or to fill "term_order" with a incremetal number. (export .csv > exel > import .csv)

2.) lock in taxonomy.php for the "function wp_get_object_terms.. " an there for string
$defaults = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');

an now, you can change the 'orderby' from 'name' to 'term_order' so you got

$defaults = array('orderby' => 'term_order', 'order' => 'ASC', 'fields' => 'all');

thats all! it tooks me 2 hours to find out. I hope everybody with thes problem will find safe the hours.

custom-order meens, in the order you put the tags while editing the post. if you want change after, you have to delete and re-put them.

greatings from switzerland

harrison72 Jan 15, 2010 11:43 AM

Quote:

Originally Posted by lizenkohlhaas (Post 10754)
i got the solution for "custom-order-tags":

1.) in db > wp_term_realtionship > term_order change to primarykey and autoincrement and standard nothing. (delete the 0) to do this, because of primary / no double numbers, you have first to delete complete or to fill "term_order" with a incremetal number. (export .csv > exel > import .csv)

2.) lock in taxonomy.php for the "function wp_get_object_terms.. " an there for string
$defaults = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');

an now, you can change the 'orderby' from 'name' to 'term_order' so you got

$defaults = array('orderby' => 'term_order', 'order' => 'ASC', 'fields' => 'all');

thats all! it tooks me 2 hours to find out. I hope everybody with thes problem will find safe the hours.

custom-order meens, in the order you put the tags while editing the post. if you want change after, you have to delete and re-put them.

greatings from switzerland

Wow lizenkohlhaas! That is amazing work! Thanks for figuring that out. I have been wanting such a solution for my cats and tags for a while, but what you came up with is way beyond my skill level. Much appreciated.

Hody Apr 2, 2012 07:24 AM

Is there also a way to order the categories, on how they appear in the menu?

juggledad Apr 2, 2012 07:45 AM

go look at the 'MENU 2 (Category Menu)' options

Hody Apr 2, 2012 03:01 PM

Thanks, used my category order, now its fixed, thanks again! :o


All times are GMT -6. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.