"After Header" only on homepage, how?

This topic is: Resolved

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!

Tagged: , ,

This topic contains 19 replies, has 3 voices, and was last updated by  surtsey 2 years, 3 months ago.

  • Author
    Posts
  • #4165

    surtsey
    Member
    Post count: 88

    I use a large advertising, and in my opinion field “After Header” should be with three different options).

    1. After Header – homepeage
    2. After Header – all peges
    3. After Header – all posts

    Now it is so that everywhere I have a large advertising, it is inconvenient for users.

    How do separately for homepage and rest peages separate fields “After Header”?

    (sorry for my english)
    Best regards.

  • #4166

    surtsey
    Member
    Post count: 88
    This reply has been marked as private.
  • #4188

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4191

    surtsey
    Member
    Post count: 88
    This reply has been marked as private.
  • #4193

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4195

    surtsey
    Member
    Post count: 88

    Thank you.

  • #4211

    surtsey
    Member
    Post count: 88
    This reply has been marked as private.
  • #4238

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4240

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4249

    surtsey
    Member
    Post count: 88

    wow! thank you!
    Can you tell me where I have to insert this code?

    add_filter( ‘yt_site_head_ads’, ‘yt_site_head_ads_by_page_post08202014’, 10, 1 );
    function yt_site_head_ads_by_page_post08202014( $output ){

    $ads = yt_get_options( ‘site_ads_after_header’ );

    if( is_single() ){
    $ads = ‘[ads_shortcode_for_posts]’;

    }elseif( is_home() ){
    $ads = ‘[ads_shortcode_for_home]’;

    }elseif( is_page() ){
    $ads = ‘[ads_shortcode_for_page]’;
    }

    $output = sprintf(‘<div class=”site-head-ads clearfix border-bottom”>
    <div class=”container site-head-ads text-center padding-top-30 padding-bottom-30 clearfix”>
    %s
    </div>
    </div>’, $ads );

    return $output;
    }

    • This reply was modified 2 years, 3 months ago by  surtsey.
    • This reply was modified 2 years, 3 months ago by  surtsey.
  • #4253

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4254

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4259

    surtsey
    Member
    Post count: 88

    Works perfectly! but I use peage as homepeage, and I have the same ad on the home and peages…

    Maybe you can help me in this too??

    Please

  • #4264

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4266

    surtsey
    Member
    Post count: 88

    I’m sorry but it does not work,
    at homepage (home) I have a code:

    [ads_shortcode_for_page]

    not:

    [ads_shortcode_for_home]

  • #4267

    surtsey
    Member
    Post count: 88
    This reply has been marked as private.
  • #4270

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4274

    surtsey
    Member
    Post count: 88
    This reply has been marked as private.
  • #4280

    Jacob
    Staff
    Post count: 2312

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4306

    surtsey
    Member
    Post count: 88

    Everything works perfectly !!!

    Thank you very much for your help!

You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!