WordPress.org

Forums

Hatch Theme Featured Image (3 posts)

  1. ellenybrown
    Member
    Posted 3 years ago #

    I have the Hatch theme and am trying to change the post.php file so that my featured image isn't left-aligned... not sure how to do it though. I think this is the line I need to add something along the lines of align => 'center" but I'm not entirely positive... Any help would be greatly appreciated! Thanks in advance!

    <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'single-thumbnail', 'link_to_post' => false, 'image_class' => 'featured', 'width' => 640, 'height' => 360, 'default_image' => get_template_directory_uri() . '/images/single_image_placeholder.png' ) ); ?>

  2. Frumph
    Member
    Posted 3 years ago #

    try doing it with CSS instead

    .post-content .featured { margin: 0 auto; }

    alternatively.

    .post-content { text-align: center; }

    with
    .entry-content { text-align: left; }

  3. ellenybrown
    Member
    Posted 3 years ago #

    2nd suggestion worked!
    thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Topic