Try adding this line to the functions.php file of your theme:
add_filter( 'the_content', 'wpautop', 20 );
Please let me know if that works.
regards
Michael
Hi Michael,
I added that line to my functions.php, but that didn’t seem to work. Here is a page with an example FAQ:
http://old.zagerguitar.com/test/
I’m using a simple shortcode to display the date as an example…you can see that the shortcode works on the page, but not in the FAQ accordion. Theres also a link to the individual FAQ post page.
I use the wpautop function when displaying the answer so that it is formatted correctly (ref. line 752 of faq-concertina.php in current version – 1.2.2). The line above causes wpautop to be executed after shortcodes.
Here is a link to an article which I believe explains the problem you are having:
http://customcreative.co.uk/resolving-wpautop-and-shortcodes/
I hope this helps you to solve the problem.
regards
Michael
Changing the priority of wpautop didn’t do the trick. However, I found this post on Stackoverflow that says
You could also do $content = get_the_content(); echo apply_filters(‘the_content’, $content); which will pass the unfiltered content returned by get_the_content() through the default filter used on the_content()
So for a quick hackish fix, I modified line 752 in faq-concertina.php to read:
$content = get_the_content();
$faq_concertina .= wpautop( apply_filters('the_content', $content) );
And now my shortcodes work!
Thanks for the info. I’ll test that out and possibly incorporate it into the code. Glad things worked for you in the end.
regards
Michael