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

Using Drip Content PHP Code in WordPress Pages

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Using Drip Content PHP Code in WordPress Pages

  • This topic has 4 replies, 2 voices, and was last updated 11 years, 1 month ago by wzp.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 5, 2014 at 11:45 pm #10618
    Ozan
    Member

    Hi,

    What I’m trying is to use the same wordpress page to drip feed content for different membership levels. And I’m using the below code which I’ve given here in the forum.

    <?php

    if(wp_emember_is_member_logged_in(‘1’) || wp_emember_is_member_logged_in(‘2’))

    {

    Example text

    }

    ?>

    But I can’t use the above code in a wordpress page.

    I’ve installed several PHP exec plugin’s but all of them are giving errors related with the syntax.

    For instance, in “Shortcode Exec PHP” plugin, I add the above lines without <?php and ?> as instructed and generate a shortcode in the plugin. But when I use that shortcode in a page, I get the error below:

    Parse error: syntax error, unexpected T_STRING in /home/dotcom/public_html/hamilelikcom/hamilelikformulucom/uye/wp-content/plugins/shortcode-exec-php/shortcode-exec-php-class.php(895) : eval()’d code on line 3

    in which line 3 is }

    I’ve tried nearly all of the php exec plugins, but non of them are working. Isn’t the above code in proper php language? How can I use the above code in a wordpress page?

    Any help would be greatly welcomed.

    Thanks from now.

    April 5, 2014 at 11:49 pm #62140
    wzp
    Moderator

    Are you sure you don’t want to use the corresponding shortcodes instead?

    http://www.tipsandtricks-hq.com/wordpress-membership/how-to-protect-a-section-of-a-post-or-page-88

    [emember_protected for=1-2 do_not_show_restricted_msg=1]
    The content goes here. this content will be hidden and only
    available to members of membership level 1, and 2.
    [/emember_protected]

    April 6, 2014 at 12:04 am #62141
    Ozan
    Member

    I’ve corrected the code, but this time the shortcodes of wp eMember and eStore are not working. The correct code is:

    <?php

    if(wp_emember_is_member_logged_in(‘1’) || wp_emember_is_member_logged_in(‘2’))

    { ?>

    Example text.

    <?php }

    ?>

    But when I use [wp_eStore_download_now_button id=12] and [wp_eMember_user_details user_info=”email”] shortcodes instead of “Example text.” they remain as text.

    How can I make the eMember and eStore shortcodes to work inside a wordpress page by using the above code?

    April 6, 2014 at 12:15 am #62142
    Ozan
    Member

    wzp, THANK YOU!

    I was struggling with this.

    I wasn’t knowing the [emember_protected] shortcode.

    This solved all of my problems. Other shortcodes works perfectly within this shortcode.

    THANK YOU A LOT AGAIN!

    April 6, 2014 at 12:50 am #62143
    wzp
    Moderator

    8)

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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