• Resolved Dax87

    (@dax87)


    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 code:

    <div id="2177-5"><script src="https://ads.themoneytizer.com/s/gen.js?type=5"></script><script src="https://ads.themoneytizer.com/s/requestform.js?siteId=2177&formatId=5" ></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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Switch the outout based on the blog ID…

    <?php
        $blog_id = get_current_blog_id();
    ?>
    <?php if( 1 == $blog_id ); ?>
        Script for site 1
    <?php elseif( 2 == $blog_id ): ?>
        Script for site 2
    <?php else: ?>
        Default script
    <?php endif; ?>
    Thread Starter Dax87

    (@dax87)

    <?php else: ?>
        Default script
    <?php endif; ?>

    In this code what should I put!?

    Thread Starter Dax87

    (@dax87)

    <?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’s correct !?

    Thread Starter Dax87

    (@dax87)

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

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

    replaced:

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

    thanks catacaustic

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘problem multisite with blog id and script’ is closed to new replies.