- This topic has 13 replies, 2 voices, and was last updated 4 years, 4 months ago by
Leo.
-
AuthorPosts
-
January 2, 2019 at 4:23 am #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.
January 2, 2019 at 9:14 am #771277Leo
StaffCustomer SupportHi 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
January 2, 2019 at 9:43 am #771305Matthias
thx, but that doesnt seem to work
January 2, 2019 at 2:08 pm #771492Leo
StaffCustomer SupportCan you guide me to the page you are referring to?
January 3, 2019 at 1:52 am #771791Matthias
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
January 3, 2019 at 7:26 am #772125Leo
StaffCustomer SupportHmm the code should definitely work on those pages.
What do you mean it’s disabled?
January 4, 2019 at 10:15 am #773190Matthias
Yes it works on these page but not the right way.
. 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
January 4, 2019 at 11:24 am #773241Leo
StaffCustomer SupportAhh 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 */ } }
January 4, 2019 at 11:30 am #773248Matthias
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
January 4, 2019 at 11:57 am #773275Leo
StaffCustomer SupportThis should’ve worked for the post category page:
https://generatepress.com/forums/topic/disable-on-blogpages/#post-771277As 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!
January 4, 2019 at 12:01 pm #773278Matthias
Iam sorry, I think I got it now. Thx for all the help, rly appreciate it
January 4, 2019 at 12:02 pm #773279Leo
StaffCustomer SupportNo problem 🙂
January 4, 2019 at 1:01 pm #773321Matthias
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)
January 4, 2019 at 5:04 pm #773440Leo
StaffCustomer SupportSometimes it might be easier to just target the condition you are after instead of doing
:not
-
AuthorPosts
- You must be logged in to reply to this topic.