• Hi there,

    I am hoping someone can help me with inserting an icon next to my list in widgets. So, for example categories will consist of an icon followed by text similar this

    CATEGORIES
    x Next Thursday

    Where the x is an icon and Thursday is the name of a category…

    I am using a theme which does not support this. How can I tweak it so an icon appears? You can see my test site here

    https://www.alternativerisktransfer.org/wordpress/

    Hope it makes sense

    Thank you

    Mia

Viewing 1 replies (of 1 total)
  • If you take a look at the code of that category list, you’ll see that each list item has a unique class:

    <ul>
    	<li class="cat-item cat-item-6"><a href="https://www.alternativerisktransfer.org/wordpress/?cat=6" title="Dette er art car boot fair....">Art Car Boot Fair</a>
    
    </li>
    	<li class="cat-item cat-item-4"><a href="https://www.alternativerisktransfer.org/wordpress/?cat=4" title="View all posts filed under Old Police Station">Old Police Station</a>
    </li>
    	<li class="cat-item cat-item-1"><a href="https://www.alternativerisktransfer.org/wordpress/?cat=1" title="View all posts filed under Rag Factory">Rag Factory</a>
    </li>
    	<li class="cat-item cat-item-5"><a href="https://www.alternativerisktransfer.org/wordpress/?cat=5" title="View all posts filed under Whitechapel Gallery">Whitechapel Gallery</a>
    </li>
    		</ul>

    So you could add a background image to each list item using CSS, something like this:

    .cat-item-6 {
    background: url('images/category-icon.jpg') no-repeat top left;
    padding: 0 0 0 20px;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Insert icon in widgets’ is closed to new replies.