Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • One of the content filters is injecting a rogue openning <p> without closeing it anywhere. I don’t know which one though.

    If you only have one post with the gallery, a quick fix for this would be :

    function remove_extra_p($content)
    {
      global $post;
    
      if ($post->ID == YOUR_POST_ID)
        return preg_replace('/<p>/','',$content);
    
      return $content;
    }
    add_filter( 'the_content', 'remove_extra_p', 200 );

    One of the content filters is injecting a rogue openning <p> without closeing it anywhere. I don’t know which one though.

    If you only have one post with the gallery, a quick fix for this would be :

    function remove_extra_p($content)
    {
      global $post;
    
      if ($post->ID == YOUR_POST_ID)
        return preg_replace('/<p>/','',$content);
    
      return $content;
    }
    add_filter( 'the_content', 'remove_extra_p', 200 );
Viewing 2 replies - 1 through 2 (of 2 total)