Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #228783
    GramDoezie
    Participant

    Hi 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.

    #228820
    Skandha
    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,
    Skandha

    #228893
    GramDoezie
    Participant

    Hi 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,
    GramDoezie

    #229070
    Skandha
    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,
    Skandha

    #229071
    GramDoezie
    Participant

    Hi Skandha,

    The lower one, so the one with the flower image.

    Kind regards,
    GramDoezie

    #229073
    Skandha
    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,
    Skandha

    #229079
    GramDoezie
    Participant

    Hi 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,
    GramDoezie

    #229091
    GramDoezie
    Participant

    Hi 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,
    GramDoezie

    #229162
    Skandha
    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,
    Skandha

    #229349
    GramDoezie
    Participant

    Done,
    GramDoezie

    #229360
    Skandha
    Participant

    @gramdoezie: Thank you for your wonderful review. Have a great day! 🙂

    Kind Regards,
    Skandha

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Changing content in widget’ is closed to new replies.