• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Content archives setting for align left is not working

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Content archives setting for align left is not working

This topic is: not resolved

Tagged: align left, content archive

  • This topic has 4 replies, 2 voices, and was last updated 6 years, 11 months ago by David Borrink.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 16, 2018 at 7:31 pm #220893
    David Borrink
    Participant

    Suddenly, I have archive featured images not aligning left when they're clearly supposed to. My content archives setting is to align left, but the class of all the images is "aligncenter" in the HTML output. I can change to align center or align right in the settings and the classes reflect those choices. What would be interfering and preventing alignleft from going to the HTML? This happened out of the blue with no changes to the site today.

    https://sallieborrink.com/blog
    June 16, 2018 at 9:37 pm #220895
    David Borrink
    Participant

    So it can't be a plug-in update since we have done none in the last 48 hours.

    I can go into the HTML in my inspector, and change a feature image's class to "align left" and the CSS takes over and makes the image align left, go to 50% width and allow the text to move to the right.... the way it should be.

    The issue still remains, why is "align left" not being assigned to the HTML when it's clearly set in the Content Archives settings? But I can set it to none, center, and right without any problem and it works. But set it to left and it goes center.

    Baffled.

    June 17, 2018 at 4:30 am #220898
    vajra
    Member

    It cannot be done automatically, either something in functions.php (use of filter to override the output) or something likewise is triggering the alignment.

    This is sort of the problem where unless we can see the hood, we cannot help.

    Goodluck.


    A WordPress developer. You can contact me here.

    June 17, 2018 at 7:06 am #220904
    David Borrink
    Participant

    It does the same on my internal setup so that leads me to believe it's a theme issue. I'll try the default Genesis Sample theme, and not my theme modified from Genesis Sample, then compare my functions files. Perhaps I bumped a line at some point.

    June 17, 2018 at 7:26 am #220905
    David Borrink
    Participant

    Found it. It was a function that somehow I forgot to delete after a failed test. I deleted it and all is well. It was this....

    /**
    * Remove Image Alignment from Featured Image
    *
    */
    function be_remove_image_alignment( $attributes ) {
    $attributes['class'] = str_replace( 'alignleft', 'aligncenter', $attributes['class'] );
    return $attributes;
    }
    add_filter( 'genesis_attr_entry-image', 'be_remove_image_alignment' );
  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble