Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Adding shortcode to the body breaks page protection

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › Adding shortcode to the body breaks page protection

Tagged: protection, shortcode, wp membership

  • This topic has 1 reply, 1 voice, and was last updated 11 years, 10 months ago by igkteam.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 10, 2013 at 11:59 pm #9314
    igkteam
    Member

    Hi there,

    What I’m running: Latest Genesis

    What I did: Created a short code call in the body of the page I’m trying to protect.

    Why: The skin of the page IS the protected content. Everything is in there. So the “content to protect” is everything, and because I assumed the BODY is what gets locked down by the membership plugin, I did this. (Nothing else worked either)

    What happened: The shortcode gets displayed – aka ALL the content – without me needing to be logged in, and then BELOW it, there is a login link.

    There’s gotta be some way around this. Is this a glitch?

    HELP!!!

    Thank you.

    July 11, 2013 at 2:06 am #56522
    igkteam
    Member

    I figured it out!

    Hopefully my hell will be helpful to someone:

    You have to initiate shortcodes before they are used right? So any place before or in the loop.

    I was missing something simple I couldn’t understand that caused the shortcodes to fire off before the login was initiated.

    All I had to do was the following:

    if (wp_emember_is_member_logged_in()) { add_action( ‘genesis_before_loop’, ‘register_shortcodes’); }

    That’s it!

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ