Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #995400

    I found the following code on a separate thread which does exactly what i’m after, however I would like it to affect all pages except for my homepage. Is there an easy way i can list my page-ids into the code below?

    Otherwise, the original thread suggested amending the ‘avia.js’ file, but i can not find the line containing the following:

    if(transparent) { if(st >……..

    So can only assume the latest ‘avia.js’ file has changed that section of code.

    ORIGINAL THREAD:

    CODE BELOW:

    @media only screen and (max-width: 989px) {
    #top #wrap_all .header_color {
    background: transparent;
    position: absolute!important;
    }
    .responsive #top .header_color.av_alternate_logo_active .logo a > img {
    opacity: 0 !important;
    }
    .responsive #top .header_color .logo img.alternate {
    display: block !important;
    }
    .responsive #top .header_color #header_meta {
    -webkit-transition: none;
    transition: none;
    background: transparent;
    }
    .responsive #top .header_color .header_bg {
    opacity: 0;
    filter: alpha(opacity=0);
    }
    .responsive #top .header_color #header_main {
    border: none;
    }
    }

    #995437

    Hey Birdster,

    You could i.e. use php code to add the styling code to all pages except the home page. You just need to add this code to your child theme functions.php:

    
    function avia_print_custom_css() {
    if ( is_home() || is_front_page() ) return;
        ?>
            <style>
    @media only screen and (max-width: 989px) {
    #top #wrap_all .header_color {
    background: transparent;
    position: absolute!important;
    }
    .responsive #top .header_color.av_alternate_logo_active .logo a > img {
    opacity: 0 !important;
    }
    .responsive #top .header_color .logo img.alternate {
    display: block !important;
    }
    .responsive #top .header_color #header_meta {
    -webkit-transition: none;
    transition: none;
    background: transparent;
    }
    .responsive #top .header_color .header_bg {
    opacity: 0;
    filter: alpha(opacity=0);
    }
    .responsive #top .header_color #header_main {
    border: none;
    }
    }
            </style>
        <?php
    }
    add_action('wp_head', 'avia_print_custom_css');
    
    

    Best regards,
    Dude

    #995477

    Works a treat, thanks Dude.

    Great service, and you can close this thread.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Apply following quick css code to all pages except homepage’ is closed to new replies.