i’ve read a couple posts and i tried many various versions of codes. Here is what i have so far in my functions.php
[Code moderated as per the Forum Rules. Please use the pastebin]
and heres what i have in my page.php
<?php if (class_exists('MultiPostThumbnails')
&& MultiPostThumbnails::has_post_thumbnail('page', 'image2')) :
MultiPostThumbnails::the_post_thumbnail('page', 'image2', NULL, 'post-image2-thumbnail');
endif; ?>
<?php if (class_exists('MultiPostThumbnails')
&& MultiPostThumbnails::has_post_thumbnail('page', 'image3')) :
MultiPostThumbnails::the_post_thumbnail('page', 'image3', NULL, 'post-image3-thumbnail');
endif; ?>
i’m new to wordpress and php. i spent many hours doing trial and errors but nothing worked and would love some guidance. thanks
I have slightly different code for functions.php but the template (page.php) code looks similar. This is what I have in functions.php and it does work:
http://pastebin.com/EqmXQR7i [Edited to use Pastebin – thanks mods]
I have associated my thumbnails with a custom post type called ‘project’ but typically it would be page or post.
Everyone starts somewhere – I’m still learning too!
just tried to copy and paste that code and changed ‘project’ to ‘post’ and no luck. the picture will display in the editor, but when i refresh the site. theres no pictures there. i’m using this in conjunction with the wp-creativx theme. heres my old site, which sucks but is live now. http://themagiclaundry.com and the new site that i’m trying to put up is http://themagiclaundry.com/blog if you notice the 3 picture thats on there now are from 3 separate empty posts with just the “featured” custom field filled out.
http://pastebin.com/FXmFpHmQ
This is what I have in single.php, but I note that you’re using ‘post’ on the functions.php one but ‘page’ in the template part?
Very nice looking site btw 🙂