WordPress.org

Ready to get started?Download WordPress

Forums

Delicacy
[resolved] Issue with [caption on Directions section (2 posts)

  1. eliboni
    Member
    Posted 1 year ago #

    Hi there - first congratulation for this great theme!

    I'm getting an issue when inserting media - a picture - in the Directions section of a recipe: in the wysiwyg editor it displays correctly and also in the plain HTML editor it displays as it is supposed to be - i.e. [caption id="attachment_231" align="alignleft" width="300"] ... - while if I save the page or preview it the "[caption..." string appears instead of being rendered with the proper "<div...".
    I'm using wp 3.4/3.5 and Delicacy 1.2.4. Adding the same image in the main article text works fine.

    Any idea on how I can better debug the issue? Thanks for any hint you can suggest!
    Enrico

  2. eliboni
    Member
    Posted 1 year ago #

    Hey, I fixed this: in single.php the code used to retrieve "Delicacy_recipe" is not properly parsed, i.e. the line:

    <?php echo get_post_meta($post->ID, "Delicacy_recipe", true);>

    should become:

    <?php echo str_replace(']]>', ']]>', apply_filters('the_content', get_post_meta($post->ID, "Delicacy_recipe", true))); ?>

    Not 100% sure this is the best way to achieve the result butit works - I believe this could be a fix for next releases...

    thx - Enrico

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic