I use a shortcode on my page like
[homepage_featuredproducts]test[/homepage_featuredproducts]
In my functions.php
function homepage_featuredproducts( $atts , $content = null ) {
if('{{emtpy}}'!=$content) $content='empty';
return $content;
}
add_shortcode( 'homepage_featuredproducts', 'homepage_featuredproducts' );
And in my template somewhere
<p><?php echo do_shortcode( '[homepage_featuredproducts]' ) ?></p>
And it allways returns "empty".
Why cant I get the content between the shortcodes in my function and return it?
if
line in your shortcode handler.