WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: HidePost] Show 1 link to guests, then a different link after login? (12 posts)

  1. sharris203
    Member
    Posted 5 years ago #

    Is it possible to show 1 link/button to all guests,
    then after they login, that link/button becomes hidden,
    then they see the member-only link/button??

  2. Funnnny
    Member
    Posted 4 years ago #

    This is a Hidepost's feature, you may want to take a look at it.

  3. sharris203
    Member
    Posted 4 years ago #

    I already know 1/2 of it: How to hide a link from Guests, and show to Users after they login (pretty obvious).

    I'm trying to do the reverse as well: Use hidepost to SHOW to a Guest, & then hide to a logged in user?

    For example, show a "Buy" link to guests, but show a "Download" link to logged in Users.

  4. Funnnny
    Member
    Posted 4 years ago #

    Use the option page, there's a option to change the text that shown to guest, change it to your "buy" link

  5. sharris203
    Member
    Posted 4 years ago #

    Thanks, that put me in the right direction. But trial and error has led me to this: I don't think it's possible for what I'm trying to do, b/c each of my blog posts has a different item and buy link. The hidepost feature sets all of the buy links to the SAME link.

  6. sharris203
    Member
    Posted 4 years ago #

    Well, I may have figured it out... I set the Protect link to my "Buy" image, and it's still letting me click on the hidden link beneath it.

  7. sharris203
    Member
    Posted 4 years ago #

    ...maybe not. Forget the last post.

  8. Funnnny
    Member
    Posted 4 years ago #

    So you want a different link for each post, right ?
    It's possible, but it requires some works around

  9. sharris203
    Member
    Posted 4 years ago #

    Yep, I wanted different links for each post. I decided to go with a different setup for the site, so this is no longer an issue for me.

  10. sharris203
    Member
    Posted 4 years ago #

    I actually ended up using a different method for this. The dirty way. Didn't use HidePost at all. Here's an example:

    <?php global $current_user; get_currentuserinfo(); if ( $current_user->user_level < 1 )
    { echo ' /*Code guests see*/ '; }
    else { echo ' /*Code members see*/ '; } ?>
  11. eljkmw
    Member
    Posted 4 years ago #

    This plugin will be even better if it incorporates grouping users into, say Group A, B and C. Then probably use [hidepost group_a] [/hidepost group_a] for instance to hide a selection portion of a post/page for Group A.

  12. hrisio
    Member
    Posted 4 years ago #

    Hi sharris203
    Can you write me how to hide a link from Guests, and show to Users after they login? thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags