Optimizing wp_get_attachment_image_src

Usually for gallery post types with lots of attachments, you would do it like this: http://codex.wordpress.org/Template_Tags/get_posts#Show_attachments_for_the_current_post Inside a “WordPress Loop”: <?php $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { echo apply_filters( ‘the_title’ , $attachment->post_title … Read more

Show Social Sharing Buttons And Facebook Comments In Lightbox Modal Dialog (Image Overlay)?

You can show Facebook and Pinterest sharing tools on the Nextgen lightbox with this tool: http://sharemygallery.com You want a facebook comment box. Unfortunately, this doesn’t do that. This plugin puts Facebook and Pinterest sharing buttons at the bottom of the image browser. It may help you if you just want to get people stared sharing … Read more

Is it possible to override the default Gallery Settings form?

There is no way to alter the gallery settings. About the only thing you can do is to override the entire gallery shortcode. You can technically have your users pass any sort of parameters into the shortcode and recognize them with your alternate gallery. Simply use: add_filter(‘post_gallery’, ‘foo_override_gallery’, 1, 2); function foo_override_gallery($empty, $attr){ //Extract the … Read more

Using Jetpack carousel w/o creating a gallery [closed]

Adding another better solution: This displays only the first image in a gallery, linked to launch the carousel. You would make that first image, and it’s caption, clearly indicate it as a link to a gallery. Give gallery an HTML ID: <div style=”display:none”> </div> Then add CSS: #gallery-link .tiled-gallery-item { display: none; } #gallery-link .tiled-gallery-item:first-child … Read more

How do I create a Client Logos section in admin menu?

This would probably best be solved with a custom post type for the Exhibit. That will give you a new section in the admin-area with posts/pages for each exhibitor. That way you can for example use: Post thumbnail as “exhibitor_logo_img” The post title as “exhibitor_title” The content area as “exhibitor_bio” And if you need the … Read more

Retrieving links and names of images from a NextGEN gallery [closed]

Ok, this has worked for me. <?php // get the track list global $nggdb; $gallery = $nggdb->get_gallery ($galleryID, ‘sortorder’, ‘ASC’, true, 0, 0); ?> <div id=”tracklist”> <?php foreach($gallery as $image) { ?> <div class=”single_image” id=”image-<?php echo $image->pid; ?>”> <a href=”https://wordpress.stackexchange.com/questions/75475/<?php the_permalink() ?>&pid=<?php echo $image->pid;?>” title=”<?php echo $image->title; ?>”> <?php echo $image->alttext; ?> </a> </div> <?php … Read more

Native gallery sorting is ignored

The Problem was caused by the plugin “Post Types Order”. It takes control over all post orders including the order within galleries. Since there does not seem to be an option to exclude galleries properly, you will have to deactivate the plugin to have control over the gallery order again.

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