WordPress.org

Ready to get started?Download WordPress

Forums

Hide a download link to non-logged in users (6 posts)

  1. Sho-Down
    Member
    Posted 1 year ago #

    I want it to say "Please log in to download this music" for non-logged in users but once they log in it'll show the download link/image instead.

    How do I do this in a post?

  2. Jose Castaneda
    Member
    Posted 1 year ago #

    is_user_logged_in( ) function at your service! ;)

  3. Sho-Down
    Member
    Posted 1 year ago #

    I need to do this for each post though. I have 8 posts per page and each post has a download link that I need hidden to guests (but show some other text) until they log in.

    Currently I'm using the podPress plugin and I had the developer create a hack for me so I could hide download links, but I want to drop podpress and start using html5 audio players and separate download links. rockitpro dot com is my site.

  4. Andrew Bartel
    Member
    Posted 1 year ago #

    Sounds like you're probably going to have to dig into some code man.

    I've used User Access Manager before in production environments and it's worked pretty well though if you don't want to edit a template file.

  5. Jose Castaneda
    Member
    Posted 1 year ago #

    Use it within the loop and it will work. :)

  6. Andrew Bartel
    Member
    Posted 1 year ago #

    It's really worth your time to follow @jcastaneda's advice and learn a little code. It will make you x10 the web site admin. Just don't forget to make a backup first! Happy coding.

Topic Closed

This topic has been closed to new replies.

About this Topic