• californiapreservation

    (@californiapreservation)


    I’m trying to get the shortcode to work in a template file (for bbpress, actually), and it doesn’t want to play nice. I thought I would try “echo do_shortcode( ‘ [neon_crm_sign_in] ‘ )”, but that doesn’t seem to be working. Is there a way to add the sign-in to a template file in wordpress?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter californiapreservation

    (@californiapreservation)

    For example:
    <?php $varsc = do_shortcode( ‘[neon_sign_in_link_return]Sign In and Return to this Page[/neon_sign_in_link_return]’ );
    echo $varsc; ?>

    Plugin Author colinpizarek

    (@colinpizarek)

    <?php echo do_shortcode( '[neon_sign_in_link_return]Sign In and Return to this Page[/neon_sign_in_link_return]' ); ?>

    This works just fine. Are you logged in? These links are hidden to all logged-in users.

    Thread Starter californiapreservation

    (@californiapreservation)

    Ah, I think I must have been coding something wrong. The code from the BBPRess template file was like this:

    <?php is_user_logged_in() ? _e( ‘You cannot reply to this topic.’, ‘bbpress’ ) : _e( echo do_shortcode( ‘[neon_sign_in_link_return]Sign In and Return to this Page[/neon_sign_in_link_return]’ ), ‘bbpress’ ); ?></p>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode in Template File’ is closed to new replies.