Viewing 6 replies - 1 through 6 (of 6 total)
  • So you have a picture inserted into the top of your post, but it’s not showing up on the blog page? That’s odd, because most of the Sugar & Spice sites that I’ve seen have their images showing. Can you please post a link to your site?

    Thread Starter TheVintageVegan

    (@thevintagevegan)

    Yes that’s right.

    Here’s my link: https://thevintagevegan.co.uk/

    Thanks ??

    OK, the default behavior for WordPress is to strip off any HTML tags on post excerpts. I thought Sugar & Spice didn’t follow this behavior, but I guess I was wrong. The reason why HTML tags (including image tags) are stripped off is somewhat technical, but it’s to prevent closing tags from being accidentally left off the excerpt and screwing up the appearance of the page.

    So, if you would like your images to show up, I would change the settings to show the entire post and using the more tag to mark where you want the excerpt to end:

    1. Go to Appearance → Theme Options.
    2. For Select Layout option, select Full posts from the drop-down list.
    3. Click the Save Options button down at the bottom.

    Now, the entire post will show up on your home page, along with images, however, you can tell WordPress when/where to stop displaying the post so the entire post doesn’t get displayed.

    1. Go into the post editor for one of your posts.
    2. Make sure the Text editor is active (instead of the Visual editor) by clicking the Text tab. The Text editor allows you to see the HTML tags.
    3. Position the cursor where you would like to see the excerpt end.
    4. Click the button labeled more. It should be next to the button labeled Table. You’ll see this tag inserted:
      <!--more-->

      You can also enter the more tag by hand (i.e., typing) instead of using the button.

    5. Update (save) your post.

    Now when you view your front page, the post excerpt will end where the <!--more--> tag was inserted, and you’ll get a Continue Reading → link like you did before, only now your images will show up.

    Luckily you don’t have a lot of older posts to go through and edit.

    Thread Starter TheVintageVegan

    (@thevintagevegan)

    Thanks a lot for that! I’m all sorted now! ??

    Is there any way to change the format of the photos? I am trying to achieve what TheVintageVegan has on her front page, but I already have too many posts to manually change each post to put the label “more”

    I am currently using “content.loop”, and I am ok with that, just that I would prefer a bigger thumbnail so that the title, date and excerpts can be below the bigger thumbnail.

    Is there a way to achieve that?

    My site is https://www.inkapaper.com

    Thank you.

    You should first create a child theme of Sugar & Spice. Otherwise, any changes you make will be lost.

    Once you’ve created a child theme, copy the function sugarspice_setup() from the parent theme’s function.php file into your child theme’s function.php file. You want to begin with the line that reads:

    if ( ! function_exists( 'sugarspice_setup' ) ) :

    and go down to (and include) the line that reads:

    add_action( 'after_setup_theme', 'sugarspice_setup' );

    Then in your child theme’s copy of the setup function, look for the line that looks like this:

    set_post_thumbnail_size( 210, 210, true );

    and comment it out by doing this:

    /* set_post_thumbnail_size( 210, 210, true ); */

    This should give you full size thumbnails.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to show pictures in post excerpt…’ is closed to new replies.