Add an Ribbon to featured ads (version 3.3)
High demand so i realized that small tuto on how do that on ClassiPress default theme
Featured ribbon to download 60px / 60px
1°) found in ClassiPress: loop-ad_listing.php
Line 24 you have :<div class="post-left">
Line 26 you have :<?php if ( $cp_options->ad_images ) cp_ad_loop_thumbnail(); ?>
past between this 2 lines
PHP Code:
<?php if(is_sticky()) {?>
<div class="featured-ribbon"></div>
<?php
}
?>
So code will look like exactly
PHP Code:
<div class="post-left">
<?php if(is_sticky()) {?>
<div class="featured-ribbon"></div>
<?php
}
?>
<?php if ( $cp_options->ad_images ) cp_ad_loop_thumbnail(); ?>
2°)
now add this css to your style.css
Code:
.featured-ribbon {background: url("/images/featured.png") no-repeat scroll 0 0 transparent;display: block;height: 60px;position: absolute;width: 60px;z-index: 300;margin:-3px}
3°)the ribbon need to be upload in the folder image \classipress\images\
if you have a child theme correct the appropriate path
4°)
because the size of the ribbon
we need to deactivate it in small phone
so in style.css under
line 1435
@media screen and (max-width: 320px) {
add
.featured-ribbon {display:none;}
so
Code:
@media screen and (max-width: 320px) {
.featured-ribbon {display:none;}
same for line1455
Code:
@media screen and (max-width: 240px) {
.featured-ribbon {display:none;}
if you are very meticulous reduce ribbon
and add your own css unfortunately i can check now on tablet but i am sure someone will do
For Grid child theme
need to do more change
so i will make a special one in Grid forum part.
Last edited by Shannon; May 17th, 2013 at 03:26 PM.