Im trying to echo the content from inside shortcodes into a conditional. I have two shortcodes like this:
function fb_fans( $atts, $content = null ) { return $content; } add_shortcode( 'fans', 'fb_fans' ); function fb_nonfans( $atts, $content = null ) { return $content; } add_shortcode( 'nonfans', 'fb_nonfans' );
then inside the loop I want echo content that the user puts inside...
[fans] echo this content [/fans] and also
[nonfans] else echo this [/nonfans]
heres what I have that obviously doesnt work
if ($like_status) { echo $fb_fans; } else { echo $fb_nonfans; }
anyone know how to write this correctly??? Thanks!