Ribbon for featured ads
Goal of this tutorial is to have a ribbon on the featured ads. Tested on Classipress Version 3.1.7 and checked with all common browsers. Something like this in the screenshot:
[CENTER]
featured-ribbon.jpg[/CENTER]
And again, please excuse my poor english, its not my native language
1./
Make a backup from the following files:
/
wp-content/themes/classipress/
style.css
/
wp-content/themes/classipress/
loop-ad_listing.php
----------------------------------------------------------------------------------------------------
2./
Open the
style.css and add the following code
to the bottom of the file (under the last line):
/* Featured Ribbon */
.featured-ribbon{
display:block;float:left; height:60px;margin:-18px 0px 0px -18px;padding:0;width:60px;
position:absolute;
background:url("http://forums.appthemes.com/images/featured.png") no-repeat scroll right top transparent; z-index:999;
}
save and close the style.css
---------------------------------------------------------------------------------------------------
3./
Open the
loop-ad_listing.php file and find the following code (should be near line 21)
PHP Code:
<div class="post-block">
under the above code you place the following:
PHP Code:
<?php if(is_sticky($post_ID) == true) echo '<span class="featured-ribbon"></span>'; else echo ''; ?>
So now it should look like this:
[CENTER]
featured-ribbon02.jpg[/CENTER]
save and close the loop-ad_listing.php
------------------------------------------------------------------------------------------------------
4./
Coose a suitable ribbon or copy this one:
featured.png
upload the ribbon image into your
/wp-content/themes/classipress/images/ folder. The name of the image should be
featured.png
-------------------------------------------------------------------------------------------------------
5./
Enjoy your new feature
The End.
Please remind, that this modification is just a basic. I did
not look into further things like search filtering and ads on top etc. That needs alot more changes.
Thanks for reading