I know this may be a simple question but I am a total beginner at WordPress coding and PHP. I am looking to embed five attachments to each post on my site, so I know it has got to do with inserting something into single.php or loop.php. So let’s say I have 8 or 10 photos attached to a post, I want the single post page to show 5 of those photos and have a link to the ‘gallery’/attachment.php page. Something like what this website does on this page, the 6 photos at the end of the post entry (http://www.celebuzz.com/2011-05-27/kim-kardashian-kris-humphries-makes-first-post-engagement-public-appearance-photos/)
I have tried using the wordpress insert but all it does is show all the pictures and I don’t want to use a plugin because I feel that it is overkill and all it needs is some code to call up 5 attached photos. Hope someone can help. Thanks in advance
Try using custom field template plugin
http://wordpress.org/extend/plugins/custom-field-template/
I know you don’t want to use plugin. But, for the sake of the questions and I know someone will eventually landed here from search engine.
You can use attachment plugin. This plugin is quite simple and very straightforward.
Once installed, it will add new meta box on post creation page.
You can add as much as images you like and
the loop
part of your template page, you add this snippet: