Support » Theme: Button » Featured Image Not Visible [Button Theme]

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

    (@zoonini)

    Automattic Happiness Engineer

    Hi there – Button isn’t designed to display featured images on pages, though you can still add them and they’ll be used as sharing thumbnails on social media.

    If you’d like to display featured images on pages, you can create a child theme to accomplish that.

    Making a child theme means your changes won’t be overwritten when you update the theme. If you’re new to child themes, you can explore these guides:

    http://codex.wordpress.org/Child_Themes
    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/
    http://vimeo.com/39023468

    Once your child theme folder is set up, make a copy of the parent theme’s page.php file and put it in your child theme.

    In the copy of page.php in your child theme, look for the line just after the opening main element on line 16, add this code there to output the featured image:

    <?php if ( has_post_thumbnail() ) : ?>
      <div class="featured-image-page">
        <?php the_post_thumbnail( 'button-featured' ); ?>
    <?php endif; ?>

    Let me know how it goes.

    Kathryn,

    Thank you very much for your reply … but now I’m confused. I got as far as your first sentence:

    Button isn’t designed to display featured images on pages

    Okay, that’s confusing, because the option is available on pages when editing them.

    Nevertheless, let’s say you can’t display featured images on pages. Then how do you get images with the beautiful vignette (or whatever it is that gives it the fancy “edging”) as shown in the demo:

    https://buttondemo.wordpress.com/

    This was one of the qualities that attracted me to the theme, but I can’t figure out why it works in the demo, but not in my working version.

    Thanks again!

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Okay, that’s confusing, because the option is available on pages when editing them.

    Right, I understand it’s a bit confusing. As I mentioned earlier, if you add a featured image to a page, although it isn’t output on the page itself, it’ll be picked up as the thumbnail image when sharing the page on social media like Facebook.

    Here’s an example using this page on the demo:

    Facebook

    Nevertheless, let’s say you can’t display featured images on pages. Then how do you get images with the beautiful vignette (or whatever it is that gives it the fancy “edging”) as shown in the demo:

    The front page of the demo shows posts, not pages. 🙂

    Pages and posts are different. Posts are displayed on the blog in reverse chronological order, and that’s what you’re seeing here: https://buttondemo.wordpress.com/

    If you add featured images to your posts they’ll be displayed on the blog with the border cutout.

    Static pages, on the other hand, won’t display featured images unless you make the theme tweak I explained above.

    You can learn more about the difference between posts and pages in WordPress.

    Let me know if this explains things a bit more!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured Image Not Visible [Button Theme]’ is closed to new replies.