WordPress.org

Ready to get started?Download WordPress

Forums

How to display a picture as a php page? (3 posts)

  1. MrBurrrns
    Member
    Posted 6 years ago #

    Hi!

    This is probably a stupid question, but I can't figure it out. And I probably suck at searching too. :P

    What I want is that when a user clicks on an image link, like:
    example.com/picture.jpg
    the picture is displayed on a php page. So that I can put a background behind it and a header above it, etc. Hope you understand what I mean...

    Somebody smarter than me please help. ;)

  2. evilbeet
    Member
    Posted 6 years ago #

    Hiya,

    When you're uploading the picture, in the space that says "Link to" click the radio button that says "Page" instead of the default "File." Then you can use attachment.php to format what the background, etc, looks like for that page (it will default to looking a lot like your main page).

    Good luck!

  3. MrBurrrns
    Member
    Posted 6 years ago #

    Thanks for the reply evilbeet!

    What you suggested works great. Only problem is that I like to upload the pictures per ftp in a folder structure and then link the pics there. So, is there any way to edit WordPress so, that when a picture is reguested, the server displays it on a page? Like a redirect or something?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags