0

I have a little problem that I can not solve. I have a website "multi-site" system with ADS script. I wish I could enter leaderboard banner.

This is an example script:

<div id=""><script src=""></script><script src="" ></script></div>

i have insert this code script is work, but the problem is that it appears the entire network, instead I wish that each script is separate and in each subdomain change advertising by area.

it correct this recall:

<?php

if ( get_current_blog_id() === 1 ) {

how can I integrate the php code with the script?

0

I have write :

<?php
    $blog_id = get_current_blog_id();
?>
<?php if( 1 == $blog_id ); ?>
    <div id=""><script src=""></script><script src="" ></script></div>
<?php elseif( 2 == $blog_id ): ?>
    <div id=""><script src=""></script><script src="" ></script></div>
<?php else: ?>
    Default script
<?php endif; ?>

It correct !?

0

OK perfect. There was a syntax error in this line:

<?php if( 1 == $blog_id ); ?>

replaced:

<?php if( 1 == $blog_id ): ?>

close post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.