Image display from custom field

If you use update_post_meta() than also use get_post_meta() (see Codex) and not get_post_custom $order = get_post_meta( $post->ID, ‘order’, true ); $image = get_post_meta( $post->ID, ‘image’, true ); And than check in your HTML source what your image tag looks like. I bet it will look like this: <img src=”https://wordpress.stackexchange.com/questions/75550/coffee_star.jpg” /> What about the path to … Read more

Insert image in comment reply

What you’re looking for could be a wp_editor() in comment form : wp_editor( $comment->comment_content, ‘content’, array( ‘media_buttons’ => true, ‘tinymce’ => false, ‘quicktags’ => $quicktags_settings ) );

Is there a shortcut to change bulk BMP images to JPG images in a site?

Assuming you add the files with the matching filenames in the appropriate wp-content/uploads/ folders you could run a few SQL queries to update the WordPress database to use the .jpg files. Assuming your wpdb prefix is wp these queries would be: UPDATE wp_posts SET post_mime_type = replace(post_mime_type, ‘image/bmp’,’image/jpeg’); UPDATE wp_posts SET guid = replace(guid, ‘.bmp’,’.jpg’); … Read more

Image sizes and order of operations

wp_get_attachment_image_src will always return a URL to a file if the image exists in some size. If the size you ask for doesn’t exist then you get the URL for the full size image as uploaded. (This isn’t the “large” image size.) So, for a valid image ID, your conditional if(wp_get_attachment_image_src($id, array($preferred_size, $preferred_size))) will always … Read more

SSL: How to make customizer images Protocol Relative in WordPress?

I think the simpler solution would be to create your own function: function get_theme_mod_img($mod_name){ return str_replace(array(‘http:’, ‘https:’), ”, get_theme_mod($mod_name)); } then just use it: <a href=”https://wordpress.stackexchange.com/questions/256864/<?php echo esc_url(get_theme_mod(“slide_one_link’)); ?>”><img src=”<?php echo esc_url( get_theme_mod_img( ‘slide_img_upload_one’ ) ); ?>” alt=”<?php echo get_theme_mod( ‘slide_title_1’ ); ?>” /></a> there is another solution that involve filters as you can see … Read more

Why is wordpress searching for @2x images?

Despite having no plugins installed through wordpress, I did have retina.min.js being enqueued in my functions.php file from the template I downloaded. Retina.min.js (source: http://imulus.github.io/retinajs/) looks for high resolution versions (denoted with suffix @2x right before the extension) of each image in your site and attempts to replace them if any are found. Since I … Read more

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