Hello,
Try to switch to a different wordpress theme temporarily to check it works with other themes or not. If it works, then disable/enable plugin one by one to check for a possible conflict.
@smc2935 Did you ever find a satisfactory resolution to this issue? I have the same problem, but I cannot access the plugins to test them, nor can I change the theme (not authorized). I’d be happy with a coding workaround if one exists.
-
This reply was modified 4 years, 2 months ago by
lukeobritt.
No, I haven’t been able to get it fixed. I disabled all of my plugins, updated WordPress and the theme is the newest version but I still can’t display HTML in the featured image caption.
At least I’m not alone. I have to do this without a plugin (not my site) so, for now, I have to be satisfied with adding the link to a line of text formatted to look like a caption. Thanks for getting back to me!
Hello! I have the same problem.
This is because $caption is escaped. For example in
wp-content/themes/oceanwp/partials/single/media/blog-single.php
// Caption
if ( $caption ) { ?>
<div class="thumbnail-caption">
<?php echo esc_attr( $caption ); ?>
</div>
<?php
} ?>
You can display HTML removing esc_attr
However, direct editing theme files is not a recommended approach. A better way should be found 🙂
Hello again!
I opened an issue at https://github.com/oceanwp/oceanwp/issues/210
Probably there will be an answer there.
However it is more safe to use wp_kses_post( $caption )
Regards