• Resolved simco

    (@simco)


    Hello-

    I used option #2, inserting your function into that location in the single.php file but still no love. Neither of the default caption text or the text inserted into your plugin text box display.

    I’d really like this to work since we have many images that need to display credits. Please advise, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author fesomia

    (@fesomia)

    Hi simco. Sorry that the proposed solution didn’t work for you. You probably already tried this, but (as I ignore your technical background) just to be sure:

    • Check that you are using get_featured_image_caption() or echo the_featured_image_caption(). The first function displays the value and the second just returns it, hence the need for echo (this may be confuging for a mistake in naming the functions)
    • Look at the source code as outputted by your browser and search for the caption string you expect to see (i.e. use a easy identifiable string such as ‘AAAAAAAAAAAAA’). Depending of the theme you’re using, it may be hidden by css, in a different place than expected or obscured by another element.
    • Make sure you’re modifing the correct template: it could be a child theme with it’s own single.php file, your post or page is using a custom template or a more specific template file (i.e. single-post.php). As before, try to put a random string and check if it shows up.

    If none of this works, you may send us a fragment of the code you’ve modified or a link to a page with the problem to see if we can help you any further.

    • This reply was modified 6 years, 8 months ago by fesomia.
    • This reply was modified 6 years, 8 months ago by fesomia.
    Thread Starter simco

    (@simco)

    Thanks for the follow up on this! I’m more than willing to keep trying. Perhaps it would be good for both of us to resolve this since Divi is such a popular theme.

    It was actually semi-successful where a few of the captions displayed but most wouldn’t. Because the site owner was getting anxious I had to go to another method.

    But, here’s what we saw happening. We have the blog connected to Facebook via Jetpack’s publicize system. But Facebook seems to want to post the caption as the first item in their feed display followed by the excerpt (we’re using excerpts instead of just allowing the first paragraph to be truncated). We also publish to Twitter but they don’t display the caption. Is there some way the caption could be set to hide for facebook?

    As far as my technological experience, I used to hand code everything with PHP. However, not in a few years. Therefore, i’m really rusty but understand what’s happening in the code, if that makes sense. I’m just not up to speed on syntax and the latest functions.

    Plugin Author fesomia

    (@fesomia)

    It’s strange that some captions show up but others don’t. Is it possible you’re using a multi-language plugin (like WPML)?

    As for the Jetpack’s Publicize plugin behaviour, we don’t use it in our workflow so not really sure how it works. I’ve looked into jetpack documentation, and seems that you can change the generated opengraph tags that facebook reads: https://developer.jetpack.com/hooks/jetpack_open_graph_tags/

    Maybe you can try to remove the caption div code from the description (og:description) with a regular expression. If that doesn’t work you may have better luck talking to the plugin creators at Jetpack support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Divi fix didn’t work’ is closed to new replies.