[Support request] Select sidebar widget in chosen page

Home Forums Support [Support request] Select sidebar widget in chosen page

Home Forums Support Select sidebar widget in chosen page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1659406
    Daniele

    I saw that there is the possibility to enable / disable some widgets in the footer, but is it possible to do this for the sidebar too?

    Thanks
    Daniele

    #1659456
    Ying
    Staff
    Customer Support

    Hi Daniele,

    Yes, for example if you want to hide a widget in sidebar on home page, you could try this CSS:

    .home #right-sidebar .the-widget-css-class{
        display: none
    }
    #1659777
    Daniele

    Thanks Ying, you are very nice and kind. Now, however, I need a code to open a widget only in one page.. Is it possible?

    Thanks,
    Daniele

    #1659787
    Elvin
    Staff
    Customer Support

    Hi there,

    Thanks Ying, you are very nice and kind. Now, however, I need a code to open a widget only in one page.. Is it possible?

    It’s definitely possible with CSS as well.

    WordPress adds in page ID to its body tag. That said, you can do something like this:

    Example:

    body.page-id-1674 #right-sidebar .the-widget-css-class{
        display: block;
    }

    Just change 1674 in body.page-id-1674 with the page-id you want the CSS to be applied.

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