Get post embedded image caption

If I understood correctly, you are trying to add, to every image embedded in a post gallery, a custom rel attribute and a title attribute based on the attachment caption. Instead of parsing the content, you can try to modify the anchor that wraps the images using the ‘wp_get_attachment_link’ filter. <?php function wpse221533_add_caption_title_to_content_gallery_image_attachments( $markup, $id, … Read more

Add visual editor to Media Edit Screen

This function added to functions.php does exactly that: // Enables Editor in Media edit screen. function add_editor_support_for_attachments($settings) { if( get_post_type() == ‘attachment’){ $quicktags_settings = array( ‘buttons’ => ‘strong,em,link,block,del,ins,ul,ol,li,code,close’ ); $settings = array( ‘wpautop’ => true, ‘textarea_name’ => ‘content’, ‘textarea_rows’ => 10, ‘media_buttons’ => false, ‘tinymce’ => true, ‘quicktags’ => $quicktags_settings, ); return $settings; } } … Read more

Featured Images on Front Page

Two categories should do the trick. Featured posts – This category should be applied to posts that you want to show on your home page, with that images grid. You can limit the number of posts (so only the, for example, 6 newest ones would appear) and select the featured image for them on each … Read more

Exact image sizes

You’ll want to use add_image_size() in your functions.php to tell WordPress you’d like it to create a new image size when you upload images: add_image_size( ‘custom_image_size_name’, 290, 180, true ); Using the value true will tell WordPress you want it to crop the image to those exact dimensions. Once you do that and upload an … Read more

Media sizes aren’t being created – server config?

It looks like “Easy Apache” handles both Apache and PHP. Only a guess, but you have recompiled Apache/PHP without the needed image libraries– either GD or ImageMagick. Without those, the server cannot physically resize images. You can use a phpinfo() script to see if the libraries are present. If not, you will need to recompile– … Read more