[Resolved] Removing default "Archives" widget and centering the container.

Home Forums Support [Resolved] Removing default "Archives" widget and centering the container.

Home Forums Support Removing default "Archives" widget and centering the container.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1307110
    Mike

    Hello, I have two questions

    1) WordPress automatically inserts an “Archives” widget if you have no widgets in a sidebar. How can I remove this? The reason why I am asking is because I serve ads in the right sidebar (Mediavine) but this is not done through a widget. I don’t want any widgets in the sidebar but I do need a sidebar for the ads. I guess I can look for a useful widgets to place there, but that’s an issue I want to visit later.

    2) How can I center my container? The theme is centering both the container and the sidebar, but I want to center just the container. The reason why I want to do this is so that if users have ads disabled they won’t be looking at content that is off centered.

    Thank you!

    #1307471
    David
    Staff
    Customer Support

    Hi there

    1. This doc explains how to remove the default sidebar widgets.

    https://docs.generatepress.com/article/generate_show_default_sidebar_widgets

    2. Try adding this CSS to compliment your existing sidebar CSS:

    @media (min-width: 1024px) {
        .content-area.grid-75 {
            width:calc(100% - 600px);
            margin-left: 300px
        }
    }

    You will want to tweak the min-width to suit your needs.

    #1307752
    Mike

    Thanks David, second solution worked perfectly. As for the first, is that line of code written in PHP? Where exactly do I add it and can I do so directly through WordPress?

    #1307831
    Leo
    Staff
    Customer Support
    #1307850
    Mike

    Thank you!

    #1307852
    Leo
    Staff
    Customer Support

    No problem 🙂

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