Support » Fixing WordPress » Specify Image in Page Edit Screen

  • I would like to specify an image in the page edit screen. I’ve seen a lot of posts on how to associate a specific image to a page by digging in the template but I can’t have users editing php. What I’m looking for is when a user creates a new page, they get a prompt for an image to associate with that page. I’ll then cobble together the template to show that image. Simple would be if the user just could post a URL that got saved with the page so I could grab it in the template. More complex would be uploading an image to attach to the page.

    Anyone point me to any resources to do this (or direct me to an elusive plugin that does exactly what I want)?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Well, not sure if this is elegant but it is working. I am using a custom field called ‘tripimg’ and adding the URL to an image. I then created a new page template and added the following:

    if ((get_post_meta($post->ID, "tripimg", true) !== "")){
    $my_custom_field = get_post_meta($post->ID, "tripimg", true);
    echo "<div id='tripimgheader'><img class='tripimg' src='".$my_custom_field."' /></div>";
Viewing 1 replies (of 1 total)
  • The topic ‘Specify Image in Page Edit Screen’ is closed to new replies.