This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Filtering text widget

11 years ago

So here is my problem.
I have a 2 column row with a text widget in each. In the right widget i have nothing but a native wordpress gallery. The thing is: the auto-p function is creating empty p tags above and below the gallery and the buttom margin on my p tags screws up the top and buttom margins of the column.

I thought i had it sorted with this filter but i can’t get it to work. Any help?

// Remove empty auto  (with no class or similar) NOT WORKING
function filter_empty_ptags($content){
   return preg_replace('//', '', $content);
}
add_filter('widget_text', 'filter_empty_ptags');

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Have a different question or issue?

Start New Thread