WPIntell

Source evidence

[Plugin: Ad Manager] Add "ad location" to theme

Ad Manager · support · 2012-05-11T11:03:00+00:00

complaintsentiment
highseverity
1.0relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 31 rows with source links

12.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

27 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Swedish_Soul unresolved
Can’t do it, here’s how it looks in sidebar.php at the moment: <?php if( is_acitve_sidebar('Ads-bar')) AdManager()->registerAdLocation('side_ad', __('side_ad')); ?> I’ve also done it the way given on the website: if(defined('AdManager::VERSION')) AdManager()->registerAdLocation('after_header', __('After theme header')); And from my function.php register_sidebar( array( 'name' => __( 'Ads-bar', 'toolbox' ), 'id' => 'reklam-side', 'description' => __( 'An optional sidebar area specifically for ads', 'toolbox' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); Doesn’t add a “ad location” though, any help would be welcome! Thanks! http://wordpress.org/extend/plugins/ad-manager-for-wp/ Ok, so now I’ve got the function.php file working but I can’t find the code that displays the ad, anyone? index.php <?php do_action('reklam_side'); ?> function.php if(defined('AdManager::VERSION')) { AdManager()->registerAdLocation('reklam_side', __('Reklam Side')); What am I doing wrong? Almost forgot: yes, I have an ad designated for this area. Never mind, got it! If anybody else has the same problem, I’m more then helpful! If you’re doing this for a public theme, replace if(defined('AdManager::VERSION')) with if(class_exists('AdManager')) because some PHP distributions throw a fatal error when checking for a constant belonging to a non-existent class. It’s for a private theme, but I’ll do it anyways if I chose to release it in the future. Thanks!

Comments

4 shown
Swedish_Soul 2012-05-11T19:54:00+00:00

Ok, so now I’ve got the function.php file working but I can’t find the code that displays the ad, anyone? index.php <?php do_action('reklam_side'); ?> function.php if(defined('AdManager::VERSION')) { AdManager()->registerAdLocation('reklam_side', __('Reklam Side')); What am I doing wrong? Almost forgot: yes, I have an ad designated for this area.

Swedish_Soul 2012-05-12T11:09:00+00:00

Never mind, got it! If anybody else has the same problem, I’m more then helpful!

digitalnature 2012-05-14T14:18:00+00:00

If you’re doing this for a public theme, replace if(defined('AdManager::VERSION')) with if(class_exists('AdManager')) because some PHP distributions throw a fatal error when checking for a constant belonging to a non-existent class.

Swedish_Soul 2012-05-14T16:46:00+00:00

It’s for a private theme, but I’ll do it anyways if I chose to release it in the future. Thanks!