WP_Editor – Remove TinyMCE Toolbars

If I remember correctly, this should remove the toolbars on the tinyMCE: function my_format_TinyMCE( $in ) { $in[‘toolbar1’] = ”; $in[‘toolbar2’] = ”; $in[‘toolbar’] = false; return $in; } add_filter( ‘tiny_mce_before_init’, ‘my_format_TinyMCE’ ); References: https://codex.wordpress.org/TinyMCE http://www.tinymce.com/wiki.php/Configuration For the wp_editor, try applying these filter parameters onto your wp_editor() function. Hope it helps. ** Edit Also if … Read more

How I can get image description/title/alt for gallery image?

You need to get the metadata of each image, add this to your functions.php file: function get_post_gallery_images_with_info($postvar = NULL) { if(!isset($postvar)){ global $post; $postvar = $post;//if the param wasnt sent } $post_content = $postvar->post_content; preg_match(‘/\[gallery.*ids=.(.*).\]/’, $post_content, $ids); $images_id = explode(“,”, $ids[1]); //we get the list of IDs of the gallery as an Array $image_gallery_with_info = … Read more

how do i create a downloadable gallery with image descriptions?

This is not a bug, it’s a style matter (that maybe renders the Question off-topic). Using the Nextgen Download Gallery plugin, this can be solved by simply applying the following rule to your theme’s style.css file: .ngg-gallery-thumbnail { width: 120px; } Adjusting the width to match your theme’s design. And even the following rule, if … Read more

First three images in post excerpt

You can do this pretty easily using the do_shortcode function. Check if an instance of exists in your post content. Here’s a simple function to drop in functions.php that checks the current post’s content for the gallery shortcode: function gallery_shortcode_exists(){ global $post; # Check the content for an instance of with or without arguments $pattern … Read more

Responsive Images

To add to the answer from @cristian.raiber, there is no function in WordPress or php to detect screen sizes, and there will in all probabilty never be such functionality. Php runs server side, which runs before clients side which is browser side. As for php, and for that matter WordPress, I cannot see any future … Read more

How do i add class=”fancybox” to the default gallery?

You can use javascript/jquery to solve this. When you insert a gallery in a wordpress posts, the whole gallery is wrapped by a div with id like “gallery-1” but also a class that’s always “gallery”. Also, every item is surrounded by two other “dl” and “dt”, with class “gallery-item” and “gallery-icon” respectively. So, you can … Read more