"After Header" only on homepage, how?

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

Status: resolved

Tagged:   

  • This topic has 19 replies, 3 voices, and was last updated 7 y, 1 mo by  surtsey.
Viewing 19 reply threads
  • Author
    Posts
    • #4165

      surtsey
      Member

      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
      This reply has been marked as private.
    • #4188

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4191

      surtsey
      Member
      This reply has been marked as private.
    • #4193

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4195

      surtsey
      Member

      Thank you.

    • #4211

      surtsey
      Member
      This reply has been marked as private.
    • #4238

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4240

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4249

      surtsey
      Member

      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 7 y, 1 mo by  surtsey.
      • This reply was modified 7 y, 1 mo by  surtsey.
    • #4253

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4254

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4259

      surtsey
      Member

      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

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

      Login | Register | Forgot Password?

    • #4266

      surtsey
      Member

      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
      This reply has been marked as private.
    • #4270

      Max
      Staff

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

      Login | Register | Forgot Password?

    • #4274

      surtsey
      Member
      This reply has been marked as private.
    • #4280

      Jacob
      Staff

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

      Login | Register | Forgot Password?

    • #4306

      surtsey
      Member

      Everything works perfectly !!!

      Thank you very much for your help!

Viewing 19 reply threads
  • You must be logged in to reply to this topic.

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

© Copyright 2021 by wpthms.com. All Rights Reserved.