When I run the following i get:
Parse error: syntax error, unexpected 'if' (T_IF) in /home3/
function list_pages_function( $atts, $content ) {
return
if(ICL_LANGUAGE_CODE=='en'){
echo "Define topic and title";
}
if(ICL_LANGUAGE_CODE=='es'){
echo "Definir el tema y título";
}
if(ICL_LANGUAGE_CODE=='it'){
echo "Definisci il topic ed il titolo";
}
if(ICL_LANGUAGE_CODE=='fr'){
echo "Définir le sujet et le titre";
}
}
add_shortcode( 'output_pages', 'list_pages_function' );
If I remove return
it is fine but when I place <li id="a"><strong>1.</strong>[output_pages]</li>
the output won't be within the <li>
but it will be right at the top of the content breaking the layout