Topic: wordpress and featured image

Hi all,

I have a problem with wordpress 3.5.1 and juice box in combination with featured image.

If I add a featured image it will also shown in the juice box gallery without adding the image in the gallery. Also the arrangement of the image in the gallery will not reflected in the juicebox gallery.

Does anybody know the issue or better a solution.

Thank you

just_me

P.S. sorry for my english, I am not a native speaker ;)

Re: wordpress and featured image

WP-Juicebox will display all images attached to a page or post, so if your page or post has a featured image, this will also be included in the Juicebox gallery. Therefore, I would recommend selecting an image which is already included in the gallery as the featured image.
However, if you would like to exclude a featured image from your WP-Juicebox gallery, open the 'wp-juicebox/config.php' file in a plain text editor and change line 52 from:

$attachments = get_children(array('post_parent'=>$post_id, 'post_type'=>'attachment', 'orderby'=>'menu_order ASC, ID', 'order'=>'DESC'));

... to:

$attachments = get_children(array('post_parent'=>$post_id, 'post_type'=>'attachment', 'orderby'=>'menu_order ASC, ID', 'order'=>'DESC',  'exclude'=>get_post_thumbnail_id($post_id)));

(The line number above refers to WP-Juicebox v1.2.0.)

Re: wordpress and featured image

Hello Steven,

thank you, it´s works. I changed the code because the featured images size is different from the gallery image size.

Re: wordpress and featured image

Sorry to resurrect such an old thread, will the same tweak work in 1.4.x? I would also like to exclude my featured images form the gallery.

Thanks.

Re: wordpress and featured image

@travis.baraki

The current version of WP-Juicebox (v1.4.4.2) now includes the ability to include or exclude the post's Featured Image without having to modify any source code.
To exclude the Featured Image from the Juicebox gallery, just deselect the 'Include Featured Image' checkbox in the gallery settings window.

You can download the current version of the plugin from its support page here.