[Resolved] Disable on blogpages

Home Forums Support [Resolved] Disable on blogpages

Home Forums Support Disable on blogpages

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #770955
    Matthias

    Hi im using the divi builder on my normal pages and GP for my blog pages. how can I disable this code on my blog pages:

    /* ** footer on scroll** */


    @media
    (min-width: 1000px) {
    .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    }

    #page {
    margin-bottom: 700px; /* adjust to the height of the footer */
    }
    }

    The code its currently disabled, because it wont appair the right way on my blog pages.

    #771277
    Leo
    Staff
    Customer Support

    Hi there,

    So exclude the code on blog page?

    If so try this:

    @media (min-width: 1000px) {
        body:not(.blog) .site-footer, body:not(.archive) .site-footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: -1;
        }
    
        body:not(.blog) #page, body:not(.archive) #page {
            margin-bottom: 700px; /* adjust to the height of the footer */
        }
    }

    More info here: https://www.w3schools.com/cssref/sel_not.asp

    #771305
    Matthias

    thx, but that doesnt seem to work

    #771492
    Leo
    Staff
    Customer Support

    Can you guide me to the page you are referring to?

    #771791
    Matthias

    https://www.insoon.nl/category/webdesign/ and https://www.insoon.nl/3-meest-voorkomende-wordpress-errors/ for example. All category and blog pages. At the moment the code is disabled

    #772125
    Leo
    Staff
    Customer Support

    Hmm the code should definitely work on those pages.

    What do you mean it’s disabled?

    #773190
    Matthias

    Yes it works on these page but not the right way. It overlaps the wrong way and show another background on top. You can check the page links https://www.insoon.nl/de-5-voordelen-van-google-adwords-voor-jouw-bedrijf/ for example. I prefer to have this code removed from the blog pages, but the code doesnt seem to work the right way

    #773241
    Leo
    Staff
    Customer Support

    Ahh so you are referring to single posts?

    If so try this:

    @media (min-width: 1000px) {
        body:not(.single) .site-footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: -1;
        }
    
        body:not(.single) #page {
            margin-bottom: 700px; /* adjust to the height of the footer */
        }
    }
    #773248
    Matthias

    thx, but that does the trick for the single blog post. But can I also disable on the post category pages: https://www.insoon.nl/category/webdesign/ for example. And is it possible to disable the code on this page only : https://www.insoon.nl/blog

    #773275
    Leo
    Staff
    Customer Support

    This should’ve worked for the post category page:
    https://generatepress.com/forums/topic/disable-on-blogpages/#post-771277

    As for https://www.insoon.nl/blog, you will have to add one more line to exclude it using body:not(.page-id-xx)

    Please keep in mind that this is a support forum for GP questions and not general CSS questions.

    Thanks!

    #773278
    Matthias

    Iam sorry, I think I got it now. Thx for all the help, rly appreciate it

    #773279
    Leo
    Staff
    Customer Support

    No problem 🙂

    #773321
    Matthias

    This the correct code btw for the css: body:not(.blog):not(.archive):not(.single)

    the above doesnt work with body:not(.blog), body:not(.archive) etc (this only works for jQuery)

    #773440
    Leo
    Staff
    Customer Support

    Sometimes it might be easier to just target the condition you are after instead of doing :not

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.