• Resolved tobyw7

    (@tobyw7)


    I’ve created a reusable footer block in Twenty Two theme but for some reason on one of the pages with slightly more content it decides to left align, and I’m not sure why or how this can be reverted. All other pages display with no issue.
    The left align is witnessed on desktop. On mobile there is no problem.
    The site is not complete and a work in progress.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Heya @tobyw7 – it looks like your reusable block is not “clearing” the previous blocks, so that’s why it’s getting squished on some pages.

    I’m not sure how familiar you are with Full Site Editing and the Site Editor, but I was wondering if there’s a particular reason you haven’t used a Footer template part for your footer? That would automatically put your footer contents inside a <footer> HTML tag, and I think if you did that, you would avoid this whole issue. ??

    You’d also avoid the need to make it a reusable block altogether, since you could include your Footer template part to in your Page template, and any other templates as needed.

    This is a different approach than what you’ve currently done with the resuable block, but it would be more in line with how Full Site Editing and templates are meant to go together.

    If you’d prefer to leave things as is, you could add a custom CSS class to your reusable block in the Advanced section of the block – for example, my-footer

    Edit Reusable block Reusable Test for 33079 Self hosted Test WordPress

    You may need to Group the block to add your class to the containing element.

    Then you could add a matching piece of CSS to the CSS editor to avoid the squishing effect on some pages:

    
    /* Clear reusable block at bottom of pages */
    .my-footer {
      clear: both;
    }
    

    To access the CSS editor in the Customizer when using FSE you’d need to add this after your URL: /wp-admin/customize.php I’m also not 100% sure, but I think

    Let me know how it goes!

    • This reply was modified 2 years, 2 months ago by Kathryn Presner. Reason: fixed typos
    Moderator Kathryn Presner

    (@zoonini)

    p.s. for other questions about Twenty Twenty-Two in the future, it would be better if you posted in the theme forum: https://www.ads-software.com/support/theme/twentytwentytwo/ No need to repost this one, though!

    Thread Starter tobyw7

    (@tobyw7)

    Hi Kathryn,

    Thanks so much for the concise updates! I am very much new to block editing / full site editing and am learning as I go here.

    You see, I set up the footer on another site on this multi-site setup. I then wondered if I could export/import it. It didn’t look like it was possible but as a reusable block I could. That’s how I got to that stage… I think!

    I’ve tested with the custom CSS class and that does work, and when I have some more time tomorrow I’ll try and rejig the footer altogether as you suggest.

    I’ll be sure to check out the dedicated theme forum in future too!

    Thank you ??

    • This reply was modified 2 years, 2 months ago by tobyw7.
    Moderator Kathryn Presner

    (@zoonini)

    @tobyw7 Sounds good! I’ll mark this as resolved since the CSS method I provided did the trick for now, but if you need further help with the Footer template method, please feel free to start a new post in the Twenty Twenty-Two forum.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Footer alignment wrong’ is closed to new replies.