What's wrong
-
Great API, bit I can’t get it to work with my own plugin. What am I doing wrong? (if I echo the $department it is showing the right value that should make $go true, but the theme is not switched)
// Switch to Twenty Eleven theme if the visitor is from a certain department Conditional_Themes_Manager::register( 'twentyeleven', function() { // Get info $user = wp_get_current_user(); $user_id = $user->ID; $department = get_cimyFieldValue($user_id,"AFDELING"); if ($department == "Department X") { $go = true; } else { $go = false; } return (bool) $go; } );</blockquote>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘What's wrong’ is closed to new replies.