Executing Slideshow w/ Custom Fields
-
I am having the darndest time with this.
Currently I use “Featured Image” to add a lead image above a post.
In some cases I would like to be able to replace this with a slideshow. I saw that you could use do_shortcode to use the shortcode outside of the body but I am having trouble with this working.
Ideally I would like to use custom fields. I have some luck with this working part way but not all the way
If I use the following code where my custom field is called ‘gallery’ and I simply but the short code in the custom field I get images on the page.
<?php echo do_shortcode( get_post_meta( $post->ID, ‘gallery’, true ) ); ?>
However, they’re not a slideshow, it’s just a vertical layout of the pictures full res on the page. It’s as though the gallery is loading part way but not fully executing.
If i put the gallery in the body with a short code but also load the gallery with custom fields they both work and I have two identical slideshows on the page.
Any thoughts on this?
- The topic ‘Executing Slideshow w/ Custom Fields’ is closed to new replies.