How do I create a gallery page?

You should try to install the NextGEN gallery plugin. http://wordpress.org/extend/plugins/nextgen-gallery/ With it, you can easily achieve the page you want. Once installed, create a few galleries and upload your pictures. You can order your single galleries into albums. On the pages listing the galleries and the albums, you can see their unique ID. Look the … 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

Add Download Button in prettyPhoto Plugin

Well programmers can make use of the prettyPhoto documentation and modify the plugin after the wp_footer() call in footer.php: Add the button via image_markup Give prettyPhoto a little height boost after adding the Download button. <?php wp_footer();?> <style>.download-btn{ margin-top: 10px; padding: 5px; background: #ccc; float: left }</style> <script> jQuery(document).ready(function() { jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto({ image_markup: ‘<img id=”fullResImage” src=”https://wordpress.stackexchange.com/questions/68012/{path}” … Read more

Large Media Library

I would not do it post by post I would use a plugin so I can manage it more and present them in lightbox or as a gallery. Plus in the future if you want to blog or add news you can always use the posts for that. Nextgen Gallery has been around for some … Read more

Fancybox not working. why?

oh and the images work, but they link to the image itself and that’s it. Are you sure the images are showing with their links? Your PHP code did not work with me, I had to use this instead: $attachments = get_posts( array( ‘post_type’ => ‘attachment’, ‘post_mime_type’=>’image’, ‘posts_per_page’ => -1, ‘post_status’ => ‘any’, ‘post_parent’ => … Read more

In which version of WordPress was the new gallery shortcode implemented?

The file /wp-includes/media.php, where the Gallery Shortcode is defined, first appears in WordPress 2.5. It has the id (singular) attribute to refer to the post_parent: $attachments = get_children(“post_parent=$id … The ids (plural) attribute appears in WordPress 3.5, and is used to include attachments: if ( ! empty( $attr[‘ids’] ) ) { $attr[‘include’] = $attr[‘ids’]; } … Read more

WordPress show Gallery Title and Captions

get_post_gallery_images only returns a singular array of image URLs, so $image->post_title etc won’t work, hence your error message. The approach generally is off – you’ve followed the codex for get_post_gallery_images but that snippet is aimed at re-using the image urls within the post, but outside the gallery output. get_attached_media is more suited here (just a … Read more

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