remove featured image from gallery woocommerce [closed]
Found an answer here: https://stackoverflow.com/questions/16922849/woocommerce-hide-featured-image-on-product-detail-page Haven’t tested it, but it might work out for you.
Found an answer here: https://stackoverflow.com/questions/16922849/woocommerce-hide-featured-image-on-product-detail-page Haven’t tested it, but it might work out for you.
Unfortunately, WP seems completely incapable of doing this…… A lit bit sensational? Just because you don’t know how to do it doesn’t mean WordPress cannot do it. First many (if not most) themes do this by default, when you insert your image into a post ( in media gallery) you can choose thumbnails which will … Read more
Use the shortcode_atts_gallery filter to override the size of the images used before making your call to get_post_gallery_images. add_filter(‘shortcode_atts_gallery’,’force_large_images’,10,3); function force_large_images($out, $pairs, $atts) { $out[‘size’] = ‘large’; return $out; } Make sure to remove the filter when you have your data, or all your galleries will always use large images. remove_filter(‘shortcode_atts_gallery’,’force_large_images’,10,3);
The quick & dirty way, to set the title as caption, would be to use SQL (untested): UPDATE wp_posts SET post_excerpt = post_title WHERE post_excerpt=”” AND post_type=”attachment” AND post_status=”inherit” AND post_mime_type=”image/jpeg” AND ID = 123 Here we target the jpeg image with ID 123 and empty caption. Note I added the ID = 123 and … Read more
Multiple Galleries is the plugin that does what you are after.
Using your above code, you were just missing the WHERE clause. Hopefully that should work. <?php global $wpdb; $images = intval( $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = {$gallery->ID}”) ); ?> <a rel=”prettyPhoto” href=”https://wordpress.stackexchange.com/questions/73192/<?php echo $image->imageURL ?>” <?php $image->thumbcode ?>> <span>view</span> </a> <?php echo $images; ?> pictures It’s not the best way to implement it, … Read more
This works for me: http://wordpress.org/support/topic/detach-amp-re-attach-media-attachment-images-from-posts#post-1609173 I’ve saved this as a snippet in my IDE for use in projects. Very handy!
i had sort out this with function get_post_gallery find the answer if ( ! function_exists( ‘flexi_gallery_slideshow’ ) ) : /** * Display an optional post read more link * */ function flexi_gallery_slideshow( ) { echo ‘<ul class=”bxslider”>’; if ( get_post_gallery() ) : $gallery = get_post_gallery( get_the_ID(), false ); /* Loop through all the image and … Read more
A little background: WP stores the attachments in the same database table as posts. Therefore the table rows correspond to the fields of the media edit modal: get_post_gallery_images will return you URLs to the images, but not the actual data in the database. You could do a reverse-query and look for posts that contain the … Read more
it seems to me, after going through the source codes (both PHP and JS), that gallery and it’s order is not saved to database at all. Gallery exists only in JS when you are creating that and even does not persist when you leave a post editing page. Gallery gets saved only by inserting gallery … Read more