WordPress.org

Ready to get started?Download WordPress

Forums

PHP Code Widget
PHP snippet works in page code but not in widget (1 post)

  1. AnotherOpus
    Member
    Posted 1 year ago #

    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?

    http://wordpress.org/extend/plugins/php-code-widget/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.