Gallery Thumbnail Layout Template

One of the better approaches is to unregister WP’s default gallery shortcode function, and add your own customized replacement. WP engineer has a great post about it here. This also will let you fix that funky inline CSS that the default gallery adds to the page.

get_image_tag filter not working

Turned out my “answer” was that I didn’t really understand “get_image_tag.” It only runs when you first insert an image. I was thinking that it ran every time the edit interface was loaded. From researching and talking with others, it seems the only way to get the metabox data onto existing images is some kind … Read more

How to wrap this Link with an Image?

Try passing in the image into the functions themselves: <?php $previous_image = “<img src=”http://domain.com/path/to/image/” alt=”Previous Posts”>”; $next_image = “<img src=”http://domain.com/path/to/image/” alt=”Newer Posts”>”; ?> <span class=”nav-previous”><?php previous_image_link( false, $previous_image ); ?></span> <span class=”nav-next”><?php next_image_link( false, $next_image ); ?></span>

Showing the attachment for a page?

Use, wp_get_attachment_image_src( $attachment_id, $size); Specify the size parameter as follows; $size (string/array) (optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of … Read more

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