- This topic has 10 replies, 2 voices, and was last updated 3 years, 5 months ago by
Skandha.
-
AuthorPosts
-
December 6, 2019 at 12:23 pm #228783
GramDoezie
ParticipantHi CatchTheme people,
I wondering if it is possible to have a different content in the widgets of a right sidebar depending on which page is opened.
For example I have a right sidebar with a widget that displays image A. That is fine for all pages in my website, except for one page. On that particular page I would like to display image B in the sidebar.
I guess that is not the idea of using widgets, but maybe it can be done.
December 6, 2019 at 10:01 pm #228820Skandha
Participant@gramdoezie: Hello there,
You can setup all your widgets in the sidebar first. Then I can provide you the CSS Code to display a widget in a specific page. Please post in your site URL as well.Kind Regards,
SkandhaDecember 7, 2019 at 2:10 pm #228893GramDoezie
ParticipantHi Skandha,
I created a test website: https://test2.clarioneers.nl/
I hope it is clear what I am looking for. Thank you in advance for your help.
Kind regards,
GramDoezieDecember 9, 2019 at 6:10 am #229070Skandha
Participant@gramdoezie: Hello GramDoezie,
I see you have two image widgets in your right sidebar. Can you let me know which widget you wanna show on specific page?Kind Regards,
SkandhaDecember 9, 2019 at 6:14 am #229071GramDoezie
ParticipantHi Skandha,
The lower one, so the one with the flower image.
Kind regards,
GramDoezieDecember 9, 2019 at 6:22 am #229073Skandha
Participant@gramdoezie: Hello GramDoezie,
Go to => Appearance => Customize => Additional CSS and add the following CSS Code.body:not(.page-id-24) #media_image-3 { display: none; }
Let me know if this works out!
Kind Regards,
SkandhaDecember 9, 2019 at 7:09 am #229079GramDoezie
ParticipantHi Skandha,
Cool that works. The image with the flower is only visible on a single page. But I also want to hide the image with the mountain on that same page. How can I do that?
This code was’t working:
body:is(.page-id-24) #media_image-2 { display: none; }
I was thinking that the pseudo selector “:is” does just the opposite, but no.
Kind regards,
GramDoezieDecember 9, 2019 at 8:06 am #229091GramDoezie
ParticipantHi Skandha,
Never mind, I figured it out:
.page-id-24 #media_image-2 { display: none; }
I was thinking too difficult.
Thanks for your help, you learned me something new on CSS code: “body:not(.page-id-24)”.
Best regards,
GramDoezieDecember 9, 2019 at 11:27 pm #229162Skandha
Participant@gramdoezie: Hello GramDoezie, I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
https://wordpress.org/support/theme/audioman/reviews/#new-post
Your review will help others know what to expect when they’re looking for the support I offer. Even a sentence or two would be hugely
appreciated. Thanks, and if there’s anything else at all that I can do to help, don’t hesitate to let me know. Have a good day! 🙂Kind Regards,
SkandhaDecember 10, 2019 at 4:34 am #229349GramDoezie
ParticipantDone,
GramDoezieDecember 10, 2019 at 6:43 am #229360Skandha
Participant@gramdoezie: Thank you for your wonderful review. Have a great day! 🙂
Kind Regards,
Skandha -
AuthorPosts
- The topic ‘Changing content in widget’ is closed to new replies.