WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
[resolved] Enable autop on editable_post_meta rich? (3 posts)

  1. vernal
    Member
    Posted 3 years ago #

    I'm using <?php editable_post_meta(get_the_ID(), 'blahblah', 'rich'); ?> in a page template and having trouble with autop.

    The wysiwyg doesn't seem to like generating P tags. It does do UL's and headings, but no P. I'm hesitant to wrap the editable_post_meta tag in a P itself because the wysiwyg does indeed spit out other block level elements such as UL, plus that would limit the being just one paragraph...

    I'm using fee 1.9.5-alpha. Any advice would be great!

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Try this:

    <?php
    add_filter('post_meta', 'wpautop', 9);
    editable_post_meta(get_the_ID(), 'blahblah', 'rich');
    remove_filter('post_meta', 'wpautop', 9);
    ?>
  3. vernal
    Member
    Posted 3 years ago #

    Brilliant as usual. Thanks, Scribu.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic