Gallery CSS Problem

You have to account for all appropriate CSS classes, based on the number of columns passed to the shortcode. Here’s my CSS (borrowed heavily from Michael Fields), for handling from 1 to 10 columns: .gallery { margin: 0px auto; text-align: center; width: 100%; min-width: 100%; } .gallery .gallery-item { float: left; margin: 0px auto; text-align: … Read more

Is this post using WordPress Gallery?

Not sure what they’re using, but it’s possible to change the URL in most modern browsers with JavaScript without refreshing the page and without using the hashtag, using the pushstate, popstate, and replacestate methods.

attachment.php code or tutorial

This is part of the WordPress template system, it allows you to drill down and further customize output based in the template hierarchy, for instance if you want the attachments to have separate functionality/style then your single.php, you simply create attachment.php or go even further with MIME_type.php (like images). http://codex.wordpress.org/images/1/18/Template_Hierarchy.png Also you have 4 url … Read more

Gallery Image Numbers?

This should do it: global $post; $ancestors = get_post_ancestors($post->ID); $photos = get_children(array( ‘post_mime_type’ => ‘image’, ‘post_parent’ => array_shift($ancestors), )); $index = 0; foreach($photos as $photo){ $index++; if($photo->ID === $post->ID) break; } printf(‘%d out of %d’, $index, count($photos));

Displaying a combination of Galleries

The built in shortcode doesn’t support that out of the box. However, it’s pretty easy to roll your own “multi-gallery” shortcode like so: <?php add_action( ‘init’, ‘wpse36779_add_shortcode’ ); /** * Adds the shortcode * * @ uses add_shortcode */ function wpse36779_add_shortcode() { add_shortcode( ‘multigallery’, ‘wpse36779_shortcode_cb’ ); } /** * The shortcode callback function * * … Read more

Exclude featured image from gallery code stops Lightbox from working

I solved this by using this code function exclude_thumbnail_from_gallery($null, $attr) { if (!$thumbnail_ID = get_post_thumbnail_id()) return $null; // no point carrying on if no thumbnail ID // temporarily remove the filter, otherwise endless loop! remove_filter(‘post_gallery’, ‘exclude_thumbnail_from_gallery’); // pop in our excluded thumbnail if (!isset($attr[‘exclude’]) || empty($attr[‘exclude’])) $attr[‘exclude’] = array($thumbnail_ID); elseif (is_array($attr[‘exclude’])) $attr[‘exclude’][] = $thumbnail_ID; // … Read more

How to use photo in multiple posts?

Probably the right solution is to find what filter is being used and seeing if it’s possible to disable it. Another: ask the theme author and share the solution here (if answered). Otherwise, try one of this plugins and see if they override this behavior: Image Pro Faster Image Insert

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