WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Shortcodes
[resolved] Display button in PHP (2 posts)

  1. Why is this not working when the user is not logged in? When the user is not logged in it shows the [button link ...] code.

    if ( !is_user_logged_in() ) {
    echo '
    [button link="" color="#f5840c" size="4" style="8" dark="0" radius="auto" target="self"]JOIN[/button]';}

    http://wordpress.org/extend/plugins/synved-shortcodes/

  2. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    You have to interpret the shortcode through WordPress. Change the echo statement to:
    echo do_shortcode('
    [button link="" color="#f5840c" size="4" style="8" dark="0" radius="auto" target="self"]JOIN[/button]');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic