watermarking gallery items

This is what I put into a watermark.php file : <?php // loads a png, jpeg or gif image from the given file name function imagecreatefromfile($image_path) { // retrieve the type of the provided image file list($width, $height, $image_type) = getimagesize($image_path); // select the appropriate imagecreatefrom* function based on the determined // image type switch … Read more

Gallery shortcode numerical sorting

It doesn’t look like you can do this with the gallery shortcode, unfortunately. The Codex doesn’t even list meta_value_num as an option (though that doesn’t mean it couldn’t work.) However, you’re correct, you must specify a meta-key to use that ordering scheme with WP_Query.

How to change the output of gallery shortcode

If anybody is interested: I managed it to add a data attribute to the article thumbnail with following filter: function post_thumbnail_add_data_attribute( $input, $post_image_id ) { $caption = wptexturize(get_post(get_post_thumbnail_id())->post_excerpt); $substitute = is_home() ? “<img” : “<img data-description=\”” . $caption . “\””; return str_replace(“<img”, $substitute, $input); } add_filter(‘post_thumbnail_html’, ‘post_thumbnail_add_data_attribute’, 10, 3 ); For the gallery I followed … Read more

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