Extract Gallery picture info from empty gallery shortcode

I don’t like how WordPress processes the gallery shortcode. This is some slightly modified code I had that I’ve used to get the images in a gallery. In this example, the attachments (and thus their IDs) would only be available after the gallery shortcode has been processed. If you’re looking to display different HTML than … Read more

Get caption from unattached images in gallery?

<?php $loop = new WP_Query( array( ‘post_type’ => ‘gallery’, ‘posts_per_page’ => 100 ) ); while ( $loop->have_posts() ) : $loop->the_post(); if ( $gallery = get_post_gallery( get_the_ID(), false ) ) : $img_ids = explode( ‘,’, $gallery[‘ids’] ); /* Loop through all the image and output them one by one */ foreach( $gallery[‘src’] as $key => $src … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)