- This topic is empty.
-
AuthorPosts
-
December 1, 2011 at 11:32 am #35417
tobeeornot
MemberHas anyone used this plugin? I have installed and registered it for multiple images but I am not getting a response in the template I am applying to and would appreciate some assistance.
December 1, 2011 at 12:10 pm #91675TheDoc
MemberHaven’t used it, sorry!
December 1, 2011 at 12:34 pm #91677tobeeornot
MemberHey Doc, basically I just want a way for the user to upload three images via the WP back-end page and apply one class for padding, etc. Is there another way around it?
December 1, 2011 at 12:36 pm #91678TheDoc
MemberWell, I’m slightly confused as to what you want to do! Previously, it looked like you were pulling in three separate pages onto the home page – is that still the case?
If so, you can just attach a featured image to each of those pages.
December 1, 2011 at 12:47 pm #91680tobeeornot
MemberNo, I just want to pull three images onto the home page. The images don’t come from any other page but need to be uploaded by the user to the homepage. Therefore I don’t think I can use the Featured Image to do it as it only applies to one image, no?
December 1, 2011 at 1:26 pm #91682TheDoc
MemberYou are correct.
You can pull attachments from a page (so, if a user has uploaded three images onto a page you can pull them out) but they’d all have to be the same dimensions and the order in which they are uploaded would matter – not a very good solution!
Do you have a screenshot of what you’re trying to accomplish? I think I have an idea of something that you can use.
December 1, 2011 at 1:43 pm #91683tobeeornot
MemberSo you can see, it is just three separate images. I just want to give the user the ability to change them via the back-end in the easiest way. It would good so they good adjust the dimensions but not essential.
December 1, 2011 at 2:20 pm #91685TheDoc
MemberYou could use the Advanced Custom Fields plugin here. Each title, text, link and image would be a separate field. So in total you’d have… 12 fields that are editable. Maybe not the nicest solution, but it’d certainly be the most flexible.
December 1, 2011 at 2:23 pm #91687tobeeornot
MemberWould you use that? Or were thinking of something else?
December 1, 2011 at 2:39 pm #91689TheDoc
MemberI think that’s probably the way I’d go. Either that or create three subpages under home and pull the content from each of those in.
December 1, 2011 at 2:53 pm #91690tobeeornot
MemberCheers Doc.
December 1, 2011 at 5:24 pm #91699noahgelman
ParticipantI’ve used this plugin several times and know it well. Paste in the code you’re trying to use and I’ll tell you how to edit it to fix your issue
December 2, 2011 at 5:39 am #91738tobeeornot
MemberThanks for that – I appreciate it.
The problem seems to be that when I go to upload the images from the WP back-end, there is no options for selecting multiple images, but it does specify the option to select image dimensions i set.
Functions php:
// Add secondary thumbnail (featured image) in posts */
if (class_exists('MultiPostThumbnails')) {
new MultiPostThumbnails(array (
'label' => 'Secondary Image',
'id' => 'secondary-image',
'post_type' => 'post' )
);
new MultiPostThumbnails(array(
'label' => 'Quaternary Image',
'id' => 'quaternary-image', )
);
new MultiPostThumbnails(array(
'label' => 'Tertiary Image',
'id' => 'tertiary-image', )
);
}
add_image_size('post-secondary-image-thumbnail', 176, 58, true);
add_image_size('post-tertiary-image-thumbnail', 176, 58, true);
add_image_size('post-quaternary-image-thumbnail', 176, 58, true);
I am looking to add three images on this template. This is the template for the relevant page:
What We Do
MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL, 'post-secondary-image-thumbnail');
?>
" class="button">View More
MultiPostThumbnails::the_post_thumbnail('post', 'quaternary-image', NULL,
'post-quaternary-image-thumbnail');?>
" class="button">View More
'post-tertiary-image-thumbnail');?>
" class="button">View More
query_posts("posts_per_page=1&post_type=page&page_id=168");
the_post (); ?>
the_post(); ?>
December 3, 2011 at 1:03 am #91796jeleyinte
MemberI have used once ‘cos I didn’t like the layout, so I uninstalled it.
December 5, 2011 at 11:58 am #91919noahgelman
ParticipantYeah, your code is a bit different than mine. Here is an example of mine.
Functions.php
if (class_exists('MultiPostThumbnails')) { new MultiPostThumbnails(array( 'label' => 'Second Featured Image', 'id' => 'second-image', 'post_type' => 'post' ) ); }Page code:
if (class_exists('MultiPostThumbnails')
&& MultiPostThumbnails::has_post_thumbnail('post', 'second-image')) :
MultiPostThumbnails::the_post_thumbnail('post', 'second-image', NULL, 'blog-post-thumbnail');
endif;
?>Compare them and see the differences with yours
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.