PHP snippet works in page code but not in widget
-
This code (below) works in the WordPress header.php
But in the Executable PHP widget nothing appears-with or without a title in the widget.
<?php if (is_user_logged_in()){ global $current_user; get_currentuserinfo(); echo('Welcome, ' . $current_user->user_firstname . ' '); } else { echo "Welcome, Visitor | ?"; }; ?>
Is there some setting I need to check to enable the PHP Code widget?
- The topic ‘PHP snippet works in page code but not in widget’ is closed to new replies.