function themeperauthor_need_switch() {
global $post;
if ( $get_post_type == 'weblogs' ) {
return get_the_author_meta('themeperauthor', $user->ID);
}
return "";
}
It doesn’t return anything
3 Answers
You are using get_post_type as variable instead of a function try:
function themeperauthor_need_switch() {
global $post;
if ( get_post_type($post) == 'weblogs' ) {
return get_the_author_meta('themeperauthor', $user->ID);
}
return "";
}