我想用它作为一个快捷码,在任何帖子/页面中显示
<?php
$user_id = get_current_user_id();
if ($user_id == 0) {
echo \'You are currently not logged in.\';
} else {
echo \'You are logged in as user \'.$user_id;
}
?>
当我这样做的时候
// Add Shortcode
function uniqueID_shortcode() {
$user_id = get_current_user_id();
if ($user_id == 0) {
echo \'You are currently not logged in.\';
} else {
echo \'You are logged in as user \'.$user_id;
}
}
add_shortcode( \'naveen\', \'uniqueID_shortcode\' );
古腾堡通过一次错误更新失败,如何解决这个问题?提前谢谢你。