Site logo

[Resolved] Position of a sidebar widget

Home Forums Support [Resolved] Position of a sidebar widget

Home Forums Support Position of a sidebar widget

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2472675
    Petar

    Hello, I’ve created a sidebar widget with a hook. The goal is to place some SEO text showing only on the index page. I did that but now I have few questions

    1. How to position it before other sidebar elements, to be the first one on the top?
    2. There is an H1 tag. But because of it, the whole section is too wide. I was wondering is it possible to make that h1 to look smaller without affecting other H1 tags used on regular pages.

    thanks

    #2473242
    Fernando
    Customer Support

    Hi Petar,

    1. How are you adding this widget currently? If it’s through a Block Element, change the hook to before_right_sidebar_content.

    2. Can you check if the settings in Customize > Layout > Sidebars work?: https://docs.generatepress.com/article/sidebar-widths/

    #2474002
    Petar

    #1 – solved. thanks
    #2 – I can do that but then other elements on the site will be out of order. Would it be possible to affect size of H1 font but only in this widget, no elsewhere on the site?

    thanks

    #2474087
    Leo
    Staff
    Customer Support

    #2 Try this CSS:

    .sidebar h1 {
        font-size: 20px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #2474297
    Petar

    private updated

    #2474326
    Fernando
    Customer Support

    The code provided by Leo shouldn’t be causing that. You have this custom code which is removing the padding for that:

    .generate-columns .inside-article {
        padding: 0 0 15px;
    }

    You can address this by adding this custom CSS:

    .generate-columns .inside-article > :is(header, .entry-summary) {
        padding-left: 10px;
        padding-right: 10px;
    }
    #2474331
    Petar

    thanks

    #2474337
    Fernando
    Customer Support

    You’re welcome, Petar!

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