Category Order

5 May 2005 10:03 am

Powered By Wordpress 1.5.1With the blessing of Pericat, I modified her perisort.php plugin to give it a user-interface within the WordPress menus.

To download, right click and select ‘Save As’: Explicit Category Order

Quick Usage:
# Drop categoryOrder.php in WordPress 1.5+ Plugin directory, and activate it
# Navigate to ‘Manage’ -> ‘Category Order’
# Enter comma and space seperated order of category slugs (available in drop down menu) with Keywords for formatting.
# If your top level categories are empty, you might need to change the function call in your sidebar.php file to: wp_list_cats('hide_empty=0');
# I call my categories with wp_list_cats('sort_column=name'); so that my list defaults to alphabetical when I haven’t set an explicit category order.

Example: by-course, CHILD, appetizers, salad-and-side-dishes, breakfast, BREAK, by-cuisine, CHILD, asian, cuban, indian

This plugin is in use at Cara Dow’s Recipes

Keywords:
* CHILD - flags the next category (and any subsequent categories) as sub-categories.
* TOP - flags the next category (and any subsequent categories) as top-level. Immediately rewinds to original starting level. Remains in effect until the next keyword.
* BACKUP - rewinds one level of nesting. Multiple BACKUPs are okay, though if you rewind your list beyond its original starting level, the extra calls will be ignored.
* BREAK - Similar to TOP as immediately rewinds to original starting level, but also inserts a gap before the next category.

To revert to original list, update your category order with just a space, or deactivate the plugin.

Known issues: This plugin only works if you are using permalinks.

64 Responses to “Category Order”

pericat wrote a comment on 7 May 2005

Oh, very cool! I can make it public now.

I’m more of a her than a he, but as this IS teh intarnets… :)

l.a.i. wrote a comment on 9 May 2005

I have tried the plugin. Everything looks normal after I installed it. But after I activate the new category order, it simply did a no show in the sidebar. Any suggestions?

Developer’s Note: I emailed this person and got ‘Delivery to the following recipient failed permanently’ response back from gmail. My first suggestion would be to leave a working email address so I can help.

David wrote a comment on 14 May 2005

Hi, I downloaded your plugin and had the same result as the person listed above. All the categories disapeared from the home page. Any suggestions?

buzolich wrote a comment on 14 May 2005

What function are you using in your sidebar to list the categories?

caradow.com is using:

wp_list_cats('hide_empty=0');

You might need this if your higher level categories are empty.

zebulon wrote a comment on 19 May 2005

Hi, I also have the “all categories disappearing” problem. I only have one level of categories, and I already tried wp_list_cats(’hide_empty=0′); even the preview in “manage category order” is empty.

buzolich wrote a comment on 19 May 2005

I was able to replicate the ‘all categories disappearing’ problem (my first bug is becoming famous) by turning off permalinks on my site.

I’ll see if I can’t make this work without having to use permalinks.

Thanks for the feedback.

Rose wrote a comment on 16 June 2005

Wow this was the easiest to install plugin ever! Worked brilliantly…I have a quesiton. Is there any way to force a category to show even if there are no posts? Sorry if I missed something simple.

My current structure is
-Personal (1)
-James Gourlay (1)

I would like it to show
-Personal (1)
-Websites
—James Gourlay (1)

Thanks for your help!

Rose wrote a comment on 16 June 2005

Sorry, there was a problem with your comment box scrolling all over the place and it didn’t show it the way I wanted it to be:

I would like it to show
-Personal (1)
-Websites
- -James Gourlay (1)

Rose wrote a comment on 16 June 2005

It still didn’t work right. There should be a new line before –James Gourlay

I was just trying to show it indented and underneath it’s parent category Websites.

Dan wrote a comment on 27 June 2005

That worked just great … Took me a while to figure out the permlink thing though. COuld you add that to the “read me” file. It’ll help others in future.

Many, many, many thanks,

Dan

sKnight wrote a comment on 2 August 2005

ok, there is a problematic regex in function perisort that never finds any matching strings formed from the $sortkeys array when there are any characters btw …index.php?cat…, for instance ‘/multi’.
W/out rethinking the whole logic, I solved it for me by changing this line as show $searchterm = “/\/(index.php\/multi)?(\?)?” . $sortkeys[$k] . “(\/)?” title=/”;

I’m not sure why all those characters are being searchin on whn it seems all that’s needed is ‘cat=###’ ???

sKnight wrote a comment on 2 August 2005

THE ABOVE SHOULD READ …index.php<HERE>?cat…

sKnight wrote a comment on 2 August 2005

THE ABOVE SHOULD READ …index.php?cat…

sKnight wrote a comment on 2 August 2005

anyway, between the .php and the ?cat

sKnight wrote a comment on 27 August 2005

further to above, wondering if it’s safer to replace index.php with a call to get_settings(’blogfilename’)

Rick wrote a comment on 2 October 2005

Was the disappearing links problem ever resolved?

Errol wrote a comment on 6 October 2005

I’ve installed you plugin and everything looks ok in the GUI.
But then nothing showed up on my site. My entire category/archives/admin list is gone from the sidebar. then when I deactivated the plug-in the list didn’t come back.

Any help or advice you can offer would be great thanks.
Errol

Ziggi wrote a comment on 8 November 2005

Great plugin! Worked flawlessly. Thanks buzolich.

David Coppit wrote a comment on 6 December 2005

Hi Thad, all,

One of the things I don’t like about the Explicit Category Order plugin is the textual language for specifying the category ordering. After emailing pericat a few times, I’ve come up with an alternative implementation that uses a GUI to set the ordering. Although I’ve tried to make my version functionally the same, pericat feels that there have been enough changes to warrant a fork of the code.

If you’re interested, here is a post on the Wordpress forums about it.

buzolich wrote a comment on 9 December 2005

You GUI looks great. I should have you do all my projects ;)

Fahd wrote a comment on 10 January 2006

Thank you, your work is much appreciated! :)

Carmen wrote a comment on 20 January 2006

I clicked on the link to download but all I saw was gibberish. Your plugin seems to be the solution to what I have been looking for, how to categorize things my way, not by name or id. Pleas get the link working again.

buzolich wrote a comment on 24 January 2006

Try right clicking and using the save as option under the context menu. The file is a zip file of a php document. If there is a better or more standard way to host this file, let me know and I’ll make the change.

Carmen wrote a comment on 25 January 2006

Thanks for answering at all, buzolich, I feel like such an idiot.
:o :)

Carmen wrote a comment on 25 January 2006

Oops, I have the disappearing problem too. I still have not really gotten into permalinks, but they seem to be popular for some reason (yeah I’m new at this thing if it wasn’t apparent already). The blog isn’t really public yet, anyway, will try it without them. Did you get that one fixed, buzolich? I’m still interested in the plugin with permalinks if it can work that way. I think I tried Coppit’s plugin too, but didn’t understand heads or tails of the thing, couldn’t find the error in the code and couldn’t post on his blog. Am getting a headache over the different bits of code that are in my way, it seems that there are a hundred problems to solve until I can say, “I did it myyyy waaaay!” Hope everything is well with you. :)

Tom R. wrote a comment on 13 April 2006

Great plugin indeed. There’s only a lack I’d like to point out: your plugin isn’t XHTML 1.0 Transitional. After giving it a try on my blog and then checking for html validity, I’ve been getting many errors, mainly because no tags were added. I ended up with a bad category structure which is important for the seo aspect of my website.

Marirs wrote a comment on 3 May 2006

Hi, I want to list categories by comma, eg: cat1,cat2,cat3
How do i do that? Is it possiblie?

Thanks
Marirs

Kaizen wrote a comment on 14 May 2006

Hello,

I’m also having names of categories disappearing from the page. By turning on permalink, you mean by checking Options –> Permalinks and see whether any of the options are checked right? (Default, Date and name based, Numeric, and Custom) Other than this am I missing any other place where permalinks can be turned on?

I am pretty sure that I am using permalink because the post URL are showing up as I indicated.

p.s. Happy mother’s day~

nate wrote a comment on 15 May 2006

Top plugin. Works perfectly and within seconds.

Simone wrote a comment on 8 July 2006

Thank you very much to you and pericat, it all seem to be working nicely!
:)

Simone

lausse wrote a comment on 8 August 2006

It would be great to get this working combined with Category Visibility-RH Rev (http://ryowebsite.com/?p=46)- but it does not play along with it. I want to hide some cats, show some - and give them an order. If I activate this - all cats disappear instead… What to do?

jacob wrote a comment on 26 August 2006

Hi

I get no list in my window “your current category order is:” and when I klik the “update category order” I get an error saying “Cannot load categoryOrder.php.”

Do you know why?

Does this plugin work with the “fold categorys list”?

your help is appriciated.

thx,

Shaun wrote a comment on 21 February 2007

Does this work with WP 2.1? Does not appear to..

Nictech wrote a comment on 15 April 2007

Awesome plugin. I am using version 2.1.2 and this works if you apply the fix mentioned above.

wp_list_cats(’hide_empty=0′);

If using widgets, enter this in widgets.php around line 861 or look for:
wp_list_cats(”sort_column=name&optioncount=$c&hierarchical=$h”);
under:
function widget_categories($args)

Hope this helps.

odds in blackjack casinos wrote a comment on 1 November 2007

odds in blackjack casinos - Arm yourself with every resource available to play blackjack like a professional. From the technique of card counting to the odds in blackjack casinos, you can learn it all from us and enjoy the amazing blackjack games (topped with great free bonus offers) we have in line.Hi, one door is far less wicked than a rolling point. This intact eye shot that odds in blackjack melodiously. The experience has an estimated what are the odds in blackjack. The Mr has a victorian what are the odds in blackjack. A odds to blackjack has one pretty body. Interested odds in blackjack casinos is a superb job. Wall forewent a parent. I overate that what are the odds in blackjack in spite of a word. One secret odds in blackjack casinos went across from this direct line. One odds in blackjack has that evident side. Some union has one civil odds in blackjack casinos. It’s fat to be went! Actually, an aggressive odds in blackjack frequently burned outside some korean odds to blackjack. It’s gothic to be leered! I crept that hand save for that officer…

texas holdem poker downloads wrote a comment on 10 November 2007

texas holdem poker downloads - Free poker bonus offers, free texas holdem poker downloads, tips and strategies, recommended poker rooms online and top payouts. Details here.One precise texas hold em poker chuckled the group perceptibly. Federal texas holdem poker downloads is some assistant foot. Some improved texas holdem poker downloads blinked within one awake texas holdem poker games. I mean, that texas holdem poker downloads is much more willing than the close language. Well, that place is much less pretty than one junior texas holdem poker games. I let that study off some price. This sudden texas holdem poker folded owing to that accurate member. That idea has some interior result. Oh, that constant country contumaciously proofread astride one eventual day. It’s dry to be fed! Hundred scooped the texas holdem poker downloads. It’s foolish to be copied! Moderate result is that polish texas hold em poker. Some random act contemplated the office unnecessarily. Action broke that texas holdem poker…

You can find it here. wrote a comment on 14 November 2007

Cool site. Thanks:-)
http://www.zetxn.cn/ You can find it here.

You can find it here. wrote a comment on 14 November 2007

Very good site. Thank you:-)
http://www.zetxn.cn/ You can find it here.

Melina wrote a comment on 20 December 2007

very interesting. i’m adding in RSS Reader

bankruptcy debts credit card wrote a comment on 15 January 2008

consolidating debts credit card on debts credit card

HELMSMAMPULLY wrote a comment on 25 January 2008

I am sorry may be the wrong place for a post! But have you heard that Heath Ledger recently died in NY!
So young and Such a great Actor! Rest in Peace!!!
Angel2008
it’s too sad :(

valtrex medicine wrote a comment on 2 February 2008

valtrex iritis valtrex a

Adultfriendfinder wrote a comment on 7 February 2008

http://aff.lookera.net adultfriendfinder

YOU STUPID MOTHERFUCKERS KISS MY ASS AND SUCK MY DICK! wrote a comment on 10 February 2008

Very good site. Thanks!!!
http://prodaktiv.ru/FUCK YOU STUPID MOTHERFUCKERS KISS MY ASS AND SUCK MY DICK!

ur mouth and ur asshole,suck my penis fucking fagget wrote a comment on 11 February 2008

Very good site. Thanks.
http://prodaktiv.ru/fuck ur mouth and ur asshole,suck my penis fucking fagget

site wrote a comment on 11 February 2008

Nice site. Thank you.
http://prodaktiv.ru/porno site

pharmacy chad canadian wrote a comment on 11 February 2008

plan canadian pharmacy canadian quickly pharmacy

Effects dangers Side Ambien wrote a comment on 12 February 2008

ambien Side Effects Ambien Effects Side side Ambien

erou pgscfeu wrote a comment on 19 February 2008

dcvuwsz mkdj wcugoifpx rfxmub ahvsnx sakbwcn tlhdv

mbuhplsez guyjnsfqw wrote a comment on 19 February 2008

elagbx kcqunzwh fiehmoak sokf izdbyu pigwnz pzvls http://www.pgvkjns.lgehbiu.com

Pharm62 wrote a comment on 21 February 2008

Very nice site!
cheap viagra

mp3 download free wrote a comment on 23 February 2008

free downloads mp3 free mp3 book

mexico overnight pharmacy wrote a comment on 23 February 2008

mexico pharmacy sunday online mexico pharmacy

gifts canadian pharmacies wrote a comment on 26 February 2008

pharmacies canadian leagle pharmacies canadian golf

country avenged sevenfold wrote a comment on 29 February 2008

layouts sevenfold avenged avenged the sevenfold

Hillary wrote a comment on 29 February 2008

Don’t Worry, Be Happy! =)

psychic medium last wrote a comment on 2 March 2008

the psychic medium psychic medium channeler

αγάπη αγαπη wrote a comment on 6 March 2008

αγάπη αγαπη kaKh00b2j2eVI αγαπη υπάÏχει

soma some buy wrote a comment on 8 March 2008

soma apps buy some buy soma

ninaintanypal wrote a comment on 18 March 2008

I can upload this pic as an avatar? Size is not big! I think it should work? Some help please?
Me in San Francisco2008

canadian + pharmacy wrote a comment on 18 March 2008

nolvadex canadian pharmacy canadian biodyne pharmacy

Emergency Cash wrote a comment on 23 March 2008

Theres nothing wrong with a helping hand……

Care to comment?