Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6875237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:17:48+00:00 2026-05-27T04:17:48+00:00

I have plugin by WPMU that creates a membership system for your wordpress theme.

  • 0

I have plugin by WPMU that creates a membership system for your wordpress theme. Im trying to make it display a gallery only when a user is a premium member and Im completely lost. My code basicly grabs part of the url and pastes it into variables in my susbscription div to draw the information needed. I need it to check if the user is logged in but Im not sure how to do that. Here is my code, Thanks:

<?php get_header(); ?>
<?php
$url = $_SERVER['REQUEST_URI'];
$url = rtrim($url, '/');

function drawId($url) {
    return array_pop(explode('-', $url));
}
?>

<div class="main-container col2-right-layout">

    <div class="main">
    <p><?php echo drawId($url); ?></p>
    <?php get_template_part('loop');?>

    <div id="subscription">
    <p><?php echo nggcf_get_gallery_field(drawId($url), "Gallery Text"); /* where 1 is the gallery id */ ?></p>
    <?php echo do_shortcode('[nggallery id='.drawId($url).']');?>
    </div>
    </div><!-- .main -->
</div><!-- .main-container col2-right-layout -->
<?php get_footer(); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:17:49+00:00Added an answer on May 27, 2026 at 4:17 am

    The following is copied and pasted from the plugin’s support forms:

    you can try any of the following for your customization needs:

    current_user_is_member()

    current_user_on_level($level_id)

    current_user_on_subscription($sub_id)

    And of course, you can get the level_id and sub_id from the respective membership level and subscription lists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a plugin system on a WCF service that checks libraries placed in
We have a plugin system here, written in c++. Now that this has to
I have a plugin installed on my wordpress blog that takes the email address
Using Wordpress, i have a plugin that inserts a playable MP3 on the page.
I have a plugin that I am trying to grab the the number of
I have a plugin for an RCP app that uses BIRT. I have a
I have a plugin that is loaded by this application.. This plugin calls some
I have a problem: imagine I have a plugin-based system. I need some kind
does jquery have any plugin that prevents entering any input to a textbox that
Does jQuery validation plugin have some dependencies? For example, I saw blogposts that said

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.