We have several PAGES (about us, contact, services, etc...)

On each page, we have an area for an IMAGE.

The IMAGE is located in the same location on each page. (lower right corner > above the footer)

We want to display a different image for each page:

  • About Us = smile.png
  • Contact Us = map.png
  • Services = tools.png

..as an example.

We want the client to use WP Page Edit "About Us" > Then have a custom field for "lower-page-image", and allow the client to upload any image they need to for that specific page.

What is the best way to do this?

We want to avoid Plug-ins, or creating several separate Template pages.

  • 1
    What had you tried? There are many ways to do this from completely custom to off-the-shelf plugins. "Best" depends on what works for you. – Rarst Apr 9 '14 at 22:10
  • We are trying to avoid plugins .. we rather go custom, but we dont know what would be best. We have tried many things, but nothing that is simple for the client to manage the image. We have built css items for each page, built separate pages .. but none of these allow the client to add an image to the pages from the EDIT PAGE area. – Ravi Ram Apr 9 '14 at 22:17
  • From the sound of it I would say that you should look into custom fields frameworks. Please note that purely asking for plugin recommendations is considered not in scope here. – Rarst Apr 9 '14 at 22:21
  • We are not looking for a plugin ... Can you point me to some example code? – Ravi Ram Apr 9 '14 at 22:28

Use post thumbnails. Add this to your theme’s functions.php:

add_action( 'wp_loaded', function() {
    add_theme_support( 'post-thumbnails' );

And in your page template get the thumbnail with:

  • Yes, without any further parameters, this will add post thumbnail support to all post types. – fuxia Apr 9 '14 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.