Home Forums General Issues Change wpautop priority on WYSIWYG


Change wpautop priority on WYSIWYG

  • Hi there

    I would like to change the priority of the wpautop filter to 12 on the WYSIWYG field so that it runs after the do_shortcode which is currently at 11. Can someone offer some help with achieving this please.

    Many thanks in advanced

  • I don’t know what other effects it would have but this should do it

    add_action('init', 'change_acf_wpautop_priority');
    function change_acf_wpautop_priority() {
      remove_filter('acf_the_content', 'wpautop');
      add_filter('acf_the_content', 'wpautop', 12);
  • Works a treat, thank you

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.