Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1312251
    chinnailu
    Participant

    Hello,
    I would like to place an Ad on top of the menu header of 320×50 px. It has to appear only on the Mobile Sites. Also, I want it to display only on Posts and Pages. I am looking for something like in attached site.

    I am using Ethos and also a child theme. What view do I need to modify and what would be the code snippet ?

    Can you please help ?

    #1312259
    Christopher
    Moderator

    Hi there,

    You can add it in topbar area, to hide it on larger screen, wrap your code within following <div></div> :

    <div class="cs-hide-xl cs-hide-lg">ad code</div>

    Hide sidebar on all pages except post and articles by adding following code :

    .x-topbar{
    display:none;
    }
    .single-post .x-topbar,.page .x-topbar{
    display:block;
    }

    Hope it helps.

    #1312264
    chinnailu
    Participant
    This reply has been marked as private.
    #1312270
    Rue Nel
    Moderator

    Hello There,

    If you want to have a white background for your topbar, please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .site .x-topbar {
      background-color: #fff;
    }

    Hope this helps. Kindly let us know.

    #1312282
    chinnailu
    Participant

    Hello,
    Thank you, it is much better now. But one help, I see lot of padding space around it. I really do not want any space around the 320×50 image or ad. Maybe 2 px padding. How can this be done ?

    #1312283
    chinnailu
    Participant
    This reply has been marked as private.
    #1312292
    Christopher
    Moderator

    Hi there,

    Please add this:

    
    .x-topbar-inner.x-container.max.width p:empty {
        display: none;
    }

    Update this code :

    .x-topbar{
    display:none;
    }
    .single-post .x-topbar,.page .x-topbar{
    display:block;
    }
    

    To:

    .x-topbar{
    display:none;
    }
    @media (max-width:979px){
    .single-post .x-topbar,.page .x-topbar{
    display:block;
    }
    }

    Thanks.

    #1312899
    chinnailu
    Participant
    This reply has been marked as private.
    #1312921
    Thai
    Moderator

    Hi There,

    Please add the following CSS:

    @media (max-width: 767px){
        .x-topbar .x-social-global {
            display: none;
        }
    }

    Hope it helps 🙂

    #1313263
    chinnailu
    Participant

    Thank you ! It works ! Appreciate your quick response.

    #1313399
    Jade
    Moderator

    You’re most welcome.

  • <script> jQuery(function($){ $("#no-reply-1312251 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>