DeveWeb
Forum Replies Created
-
Forum: Hacks
In reply to: Need to add sponsor banner before posts on Category archive page SOSready i solvent the code
function sponsor_banner($post) { static $already_run = false; if (is_category('sociedad')) { if ( !$already_run) { ?> <a href="http://www.domainsponsor.com/" target="_blank"><img src="/wordpress/wp-content/publicidad/usa.jpg" /></a> <?php $already_run = true; } } } add_action('the_post', 'sponsor_banner');thanksssss a lot Mike you are the Best.!! 🙂
but when I try to duplicate the code to add a another sponsor to another category gives me an error. how to duplicate the code and I do not throw error?
// Sponsor 1 function sponsor_banner($post) { static $already_run = false; if (is_category('ciencia')) { if ( !$already_run) { ?> <a href="http://www.domain.com/" target="_blank"><img src="/wp-content/publicidad/usa.jpg" /></a> <?php $already_run = true; } } } add_action('the_post', 'sponsor_banner'); // Sponsor 2 function sponsor_banner($post) { static $already_run = false; if (is_category('comunidad')) { if ( !$already_run) { ?> <a href="http://www.domain.com/" target="_blank"><img src="/wp-content/publicidad/usa.jpg" /></a> <?php $already_run = true; } } } add_action('the_post', 'sponsor_banner');Forum: Hacks
In reply to: Need to add sponsor banner before posts on Category archive page SOSthanks a lot Mike for you answer but i dont see this image, i trie to add this code in twintyten theme for test the code but i dont see any image, in what line number in specific put the code? can you explain me step by step Please..!! 🙁
Forum: Hacks
In reply to: Need to add sponsor banner before posts on Category archive pagethanks Mike, i open a new port, but not answer 🙁 please help my post http://ww.wp.xz.cn/support/topic/need-to-add-sponsor-banner-before-posts-on-category-archive-page-sos?replies=1
Forum: Hacks
In reply to: Need to add sponsor banner before posts on Category archive pageSOS guyss How to ADD this code pleaseee 🙁
Forum: Hacks
In reply to: Need to add sponsor banner before posts on Category archive pagethanks for the code, But I have a problem trying to put the code gives me an error, the code is put in functions.php theme / yourtheme / functions.php? I tried but I get error when I add the code line?