Membership Forums Support Prevent Direct Access Gold How to get protected or private URL via custom coding for front-end?

How to get protected or private URL via custom coding for front-end?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Helpful
    Up
    0
    Down
    Not Helpful

    Vincent
    Guest

    Not really problem but a way to simply get an image or document’s protected URL and show it in the front-end. Thanks!

    Created

    Vincent
    Guest
    Last reply
    Tim
    1749 views
    2 replies
    Helpful
    Up
    0
    Down
    Not Helpful

    Tim
    Keymaster

    Hi Vincent,

    Thanks for reaching out to us.

    Yes, you can get the protected URL of any files using the default WordPress functions.
    [Please login to view this link]
    [Please login to view this link]

    For example, you can use this on your page template. echo wp_get_attachment_url(887*);

    * attachment_id

    Hope it helps.

    Created

    Tim
    Keymaster
    Last reply
    Tim
    1749 views
    2 replies
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.