I need to add shortcodes such as image, hr and button. However, I also needed to remove the wpautop filter (remove_filter('the_content','wpautop')) for hr to work properly. Now, to manually set paraghraps I set a shortcode pto simply convert [p]text[/p] with <p>text</p>.
But, inside [p /] the other shortcodes aren't working. I guess that it modifies the content. Here's my simple function:
function p_func($atts,$content) {
return '<p>'.$content.'</p>';
}
add_shortcode('p','p_func');
I'm getting a bit nervous with this, as my functions.php seems to be full of hacks already. Any advice?
Martti Laine