No border around icons
April 2, 2008 by submarine
Sometimes, you don’t want to have a border around the icons. Try this.
1. In the posts
In your template file, put the following code if you want no link and no border (most of the time, just ‘link=false’ do the trick) :
get_cat_icon(’class=myicons&link=false’);
with this added in your style.css file :
.myicons {
border: 0px;
}
border: 0px;
}
2. In the sidebar
Use the put_cat_icons() function. Example :
put_cat_icons(wp_list_categories(’echo=0′),’class=myicons’);
But you can also use the widget as an alternative, which is easier, but don’t forget to activate it. You’ll need to enter the following parameters in put_cat_icons() field :
class=myicons
3. Use the border parameter
In your pages and posts :
get_cat_icon('border=false');
In the sidebar :
put_cat_icons(wp_list_categories(’echo=0′),’border=false’);
In the widget parameters:
I want border around icons in my sidebar.php to disappear.
How do I insert this in sidebar.php: get_cat_icon(’class=myicons&link=false’);
Style.cc file is updated accordingly. But I don’t know what to do in sidebar.php.
Thanks
Why don’t you use the Template Code ? In the options, check ‘Process the list of categories (usually used in sidebar) ?’ Then, go to the Template Code tab, and look at the bottom : you’ll find where to put the code in your sidebar. The code to put in the sidebar is not get_cat_icon(), but put_cat_icons().
example :
put_cat_icons(wp_list_categories(’echo=0′),’class=myicons’);
But you can also use the widget as an alternative, which is easier. You’ll need to enter the following parameters in put_cat_icons() field :
class=myicons
thanks, I used the widget.
maybe you need to let users know that they have to activate the widget on plugins page before they can see it as one of the option.
thanks again for the great plugin.
@Ellie
You’re welcome, Ellie.