你可以通过echo
, 只需将其放在if条件括号内的新行上{
和}
e、 g。
if(this statement is true)
{ // <- do everything between here
/*
stuff that happens if the statement is true
*/
} // <-- and here
else
{
// stuff that happens if the statement is not true
}
所以你可以这样做:
if( is_page( 39 ) ) {
echo do_shortcode(\'[nggallery id=1]\');
// add more stuff here, e.g. echo "<p>Bio info etc</p>";
echo "<p>Bio</p>";
}