I am currently using this shortcode: [CATEGORIES COUNT=”yes”] on a page to create an index of categories.
It works perfectly, I just want to make a design change: Currently it is displaying the list of categories in 3 columns and I would like to make it 2 columns to fit my page better.
Can I do this with CSS in the Custom Meta Data (Design Setup) area, or can I use html on the page itself to achieve this? (If so how?)
Any advice is appreciated.
After doing some reading/research:
I tried modifying the file: class_shortcodes.php
Under this section: /* ==================================================== [CATEGORY] – SHORTCODE =====================================================*/
$STRING .= ‘<ul class=”col-md-4”><li class=”head”> ________________________________________________
I modified the “col-md-4” to be “col-md-6” as I understand according to the bootstrap documentation this should be two equal columns, however, it changed it to be ONE column when I did this.
What am I missing?
Hello Amy Could you provide url
Every time I ask a question on this forum people want my URL, lol I can’t give URL, site is still in development.
Here is a screen capture showing how the categories are displaying in ONE column after I made the code change to the class_shortcodes.php file as I indicated above.
As you can see, this would look much better in 2 columns, but it is way too crowded with the default 3 columns. (Since I want to keep the sidebar on this page)
I thought changing the default “col-md-4” to be “col-md-6” would do the trick, but as you can see, it did not.
use this, [TAXONOMY name=’listing’ count=’yes’ icon=’no’ perrow=2]
Thank you Hemanta, It kinda worked and kinda didn’t.
It flowed into 4 colums instead of 2. I changed the perrow number to 1 and then got 3 columns… It also scrambled up the order (seemed to be categories with the most listings first etc…) I need it alphabetical. Tried adding order=”desc”, but that didn’t work.
I switched back to [CATEGORIES COUNT=”yes”] for now as it is better that it be one column and alphabetical, but still not as preferred (2 columns and alphabetical order) Hmmmm. Thanks for your reply though, appreciate it.
Have you done this change ?
Yes I did. In class_shortcodes.php under CATEGORIES it is currently set to be “col-md-6”. I thought this meant 2 equal columns, but for some reason even after I changed it, it’s giving me only 1 column.
set it to default and try the perrow option.
it orders by number of listing. To order it by alphabetically, use plugin
Start your new website today!