Featured image caption not showing in Tenaz theme

  • Unknown's avatar

    I’m wondering why the caption does not appear when a featured image is selected for a post and a default caption is defined in the media library for that image.

    @supernovia You responded to a previous forum topic on this question by saying the caption doesn’t always appear (why does the image above suggest they would?) You suggested as a solution that the featured image and caption could be manually inserted into the post. However, that causes the featured image to show up twice. This topic is important for news publishers because it’s important to provide credits for photos provided by contributors.

    Media library fields:

    However, no caption appears: https://earthhope.net/2023/10/18/love-machines-to-lure-fairy-penguins-to-australian-nature-reserve-after-first-chick-in-30-years/

    Thanks for any help!

    The blog I need help with is: (visible only to logged in users)

  • Hey there @amandaroyal23! Looks like you’ve made some good progress.

    I know there are a handful of plugins that will show captions on featured images. I can’t remember; were you using one before, and if so, which one?

    https://wordpress.org/plugins/search/featured+image+caption/

    In your case, what if you were to show the caption below the image if you’re using a “single” page template? And for posts that show up elsewhere on the site (in the sidebar for example) would alt-text be okay instead of showing the whole caption, so that the extra text doesn’t affect the layout?

  • Unknown's avatar

    RE: In your case, what if you were to show the caption below the image if you’re using a “single” page template? And for posts that show up elsewhere on the site (in the sidebar for example) would alt-text be okay instead of showing the whole caption, so that the extra text doesn’t affect the layout?

    I don’t understand any of that.

    I was just wondering why there’s a field in the editor that doesn’t work. Seems like anyone in my position would have the same question.

    Yes, tried a featured image caption plugin, but it was causing problems when the post was duplicated on the same page. The test on that plugin was also bigger than the text in the posts, so it didn’t look great. I will probably eventually eliminate the “Recent posts” column as a way to resolve the duplicate posts. Maybe have something in that space that I manually select.

  • Captions will appear anywhere you use an image block, but featured images work differently from regular images.

    For example, when you share on social media, the featured image will show up. The caption for it won’t. Still I agree we should have an option to display the caption in templates, so I’ve shared your request.

    For now, if you want to use the plugin you were using before, what do you think of showing the caption on the post, but hiding them in the sidebars? If you want to do that, we can help get the right code for it. Or there may be a plugin with that option built in.

  • Oh and re: this,

    I will probably eventually eliminate the “Recent posts” column as a way to resolve the duplicate posts. Maybe have something in that space that I manually select.

    I’d still recommend using tags to decide what posts to display in the different parts of the site. If you want to pick a few posts to display in the sidebar and give them all the same tag, we can help.

  • Unknown's avatar

    RE: what do you think of showing the caption on the post, but hiding them in the sidebars?

    For the plugin I was using, captions weren’t supposed to show up in the sidebars. If the post was duplicated on the same page, the caption would rise like a zombie in the sidebar, only for the duplicated post. I agree there’s no need for a caption in the sidebar. Just trying to get a caption under the featured image when it appears in the actual post, which is what the editing field appears to promise.

    RE: I’d still recommend using tags to decide what posts to display in the different parts of the site. 

    My struggle has been with the “recent posts” query loop, which is a block that’s part of the post template. Since I can’t customize that sidebar for every post, there isn’t a categorization logic that would exclude the current post in the query loop. I think this will be a perennial problem, since multiple blocks in one template don’t seem to be able to talk to each other (so a query loop in one block has no idea what another block on the same page is doing, so you can’t tell it to exclude something in its query that shows up on the rest of the page). I guess if I want to customize a sidebar for each post, I’d have to delete the “recent posts” sidebar from the posts template and add a sidebar manually every time I make a post?

    I also have a suspicion that that “recent posts” sidebar has no limit to the number of titles it will display. Will it go to infinity?

  • Unknown's avatar

    Also, back to my original question. The caption field says: “If empty, the post will show the default caption defined in the media library.” Is the caption supposed to show on the post (on the blog itself, not social) or not? What is the expected behavior? It doesn’t show anywhere for me.

  • Hi there,

    For the plugin I was using, captions weren’t supposed to show up in the sidebars. If the post was duplicated on the same page, the caption would rise like a zombie in the sidebar, only for the duplicated post. I agree there’s no need for a caption in the sidebar. Just trying to get a caption under the featured image when it appears in the actual post, which is what the editing field appears to promise.

    We’re not familiar with the coding of the featured image caption plugins that you’ve added to your site, since those were created by outside developers to “work with WordPress” but were not created by WordPress.com staff.

    That behaviour sounds pretty baffling, so you may wish to contact support for your plugin creators to see if they have any thoughts on how to suppress captions in some places, but have them show in others. https://wordpress.org/support/plugin/fsm-custom-featured-image-caption/

    By the way, I do not recommend you use the Featured Image Caption plugin on your site since the developer has not updated it in several years. It’s likely this plugin does not work with recent themes like Tenaz, which was created in the time since that plugin was updated:

    https://wordpress.com/plugins/featured-image-caption/

    Since I can’t customize that sidebar for every post, there isn’t a categorization logic that would exclude the current post in the query loop […] I guess if I want to customize a sidebar for each post, I’d have to delete the “recent posts” sidebar from the posts template and add a sidebar manually every time I make a post?

    While it is possible that the Query Loop block may include that kind of logic in a future update, it’s not possible at this time. That logic seems simple, but technically speaking it’s difficult to implement with, especially with individual components like blocks. I’m sure that sites with this functionality do exist, but it’s likely that the solution they used is something that was custom-coded.

    Blocks are pretty awesome but they do not fully take the place of custom-developed code, so this is probably best thought of as a challenge that has not yet been solved.

    Thinking outside of the box a bit, there are a few solutions I can think of to try here in the interim:

    1. Modify the sidebar Query Loop so that it does not show featured images. Perhaps a recent posts list that is text-only would not feel so obvious, where seeing the featured image repeated twice is very easy to spot.
    2. Modify the single post template to remove the Featured Image in the main post. Lots of site do this so that they can set the featured image as a totally separate thumbnail, and then add fresh images into the post itself.
    3. You could try the Related Posts Block in the sidebar instead of the Query Loop. This would show posts related to the post currently being viewed but has logic that would avoid picking the post (you are viewing) twice. https://wordpress.com/support/wordpress-editor/blocks/related-posts-block/
  • Hi again,

    The caption field says: “If empty, the post will show the default caption defined in the media library.” Is the caption supposed to show on the post (on the blog itself, not social) or not? What is the expected behavior? It doesn’t show anywhere for me.

    I’m not sure I’ve understood where you are reading that. Can you walk us through how you are getting to that message? When you add a standard image to your blog post using the Image Block? something you see when you try to set a caption for Featured Images using one of the plugins you have installed?

    If you can share a URL to the page where you see this message, as well as a screenshot so we can see where the message is found within the full view, that will help. Thanks!

  • Unknown's avatar

    The caption field must have been part of the plugin I deactivated, because it’s not showing up anymore. I will follow your steps 1-3 to address my other questions. Thanks so much for the help.

  • The topic ‘Featured image caption not showing in Tenaz theme’ is closed to new replies.