ECI: Directory Short-Code
This feature was added 24th August 2011 version 6.3.9 and I’m writing this ahead of that version being released.
The new directory short-code can be used to create a multi-level directory of categories then list posts for selection also. Configuration is simple and the possibilities for customising the functions that build the directory tables are endless. A lot more will come in future for this short-code but right now my client who is hiring me to create it gets priority.
Key Information
- [ecidirectory initialcat="123" listposts="3"]
- initialcat: all children of the category you add here will be listed, within the page or post you place the short-code
- initialcat: add either category id or name
- listposts: the level which you want posts to be listed, keeping in mind that just because a category has posts assigned to it, it does not mean there are no further categories. The short-code could be improved to show both the selected categories posts plus the selected categories child categories for further selection. Please comment below to have this done.
Features
I could not find another plugin that offers a short-code like this and I’m just getting started with it really. This short-code allows us to display a list of links, either categories or posts. Within a well laid out table, within any post or page. The table is evenly balanced. The order of items goes down the first column, then down the second column. My function does not build the table by completing each row at a time, instead it completes the first column, then the second. There is scope to add more columns if needed, please comment below to request this ability.
If the total number of categories or posts is an odd number, the last (currently the second) column will have one less item, a blank table field. No formatting has been applied to the table, it should automatically be styled by your theme if your theme author has created a style for <table>.
Video Tutorial
Working Example
I’m going to add a real working example to my own site however I want to code the short-code into my theme or an existing plugin rather than installing ECI when I don’t need it. This will come much later but if you really want to see it in action please comment below.