i want to added mini icon on imgae post on every category post.
please some one can help me ?
sorry my english very bad.
i want to added mini icon on imgae post on every category post.
please some one can help me ?
sorry my english very bad.
The most simple way of doing this is by checking if a thumbnail exists, and if so, checking that a category is assigned, and if so, adding the icon.
In the Page Template, you'd have something like this:
<div class="thumbnailContainer">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
$singleCatTitle = single_cat_title("", false);
if(single_cat_title("", false)){
?>
<img class="thumbnailBannerIcon" src="/path/to/<?php echo $singleCatTitle ?>.png"/>
<?php
}
}
?>
</div>
Then, by using "position: relative;" on the thumbnail container, and "position: absolute;" on the icon, you can place it in the corner, appropriately.
You must log in to post.