How would I get this to work – send to post from thick box

The correct way to do this is to: $(‘#upload-background-image-one’).click(function() { formfield = $(‘#background-size-one’).attr(‘name’); tb_show(”, ‘media-upload.php?type=image&TB_iframe=true’); // Take the selected image and insert only the src path into the text field. window.send_to_editor = function(html) { img_url = $(‘img’, html).attr(‘src’); $(‘#background-size-one’).val(img_url); tb_remove(); } return false; }); because when you click on a button you instantiate a call … Read more

Create image with imagepng() (fails at header)

You could try using get_template_directory() instead of ABSPATH. If wp-content is not in it’s original location on production server that might solve your problem. Mind the lack of trailing slash after get_template_directory(): $font = get_template_directory().’/ledboard.ttf’; … file_put_contents(get_template_directory().’/img/’.$arrayFuels[$i].’.png’, $data);

Magnific Popup – Add Caption to Images

You have to add the title attribute to the <a href> code surrounding the images that the Magnific Popup effect is being applied to. The new code should look like this: $thumb_img = get_post( get_post_thumbnail_id() ); // Get post by ID $excerpt = $thumb_img->post_excerpt; // Display Caption <a href=”https://wordpress.stackexchange.com/questions/178297/{current_url_here}” title=”<?php echo $excerpt; ?>” /> It … Read more