Use full size images in a specific gallery
The gallery shortcode accepts a size parameter: This will select the full size image. For the URLs see this answer.
The gallery shortcode accepts a size parameter: This will select the full size image. For the URLs see this answer.
Yep – it is pretty inefficient. Here is a rewrite: <div id=”engagement”> <?php $images = new WP_Query( array( ‘post_parent’ => get_the_ID(), ‘post_status’ => ‘inherit’, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’, ‘orderby’ => ‘menu_order ID’, ‘offset’ => 0, ‘posts_per_page’ => 6, // show six images total ‘update_post_term_cache’ => false, ) ); $count = … Read more
You are using relative URLs in some places. That is, you are using this– <img src=”https://wordpress.stackexchange.com/bruce_lipton1.jpg” />— instead of this– <img src=”http://www.pureplantessentials.com/bruce_lipton1.jpg” />. Don’t do that. Relative URLs are very unreliable in most of WordPress. It has to do with the way that WordPress rewrites URLs. Your theme, for example, is at wp-content/themes/theme-name/ but those … Read more
I can’t comment on your code, but you might find this link useful: Options Framework Theme: http://wptheming.com/options-framework-theme/ This is something you have to edit carefully, but it has pretty much every type of control you can think of in there. It also had the only working MCE Editor that I could find. I wanted that … Read more
The easiest and quickest way that you can do this is by downloading the Comment Images plugin and limit access to the upload feature by the function current_user_can. As the WP page demonstrates, use: if ( current_user_can(‘manage_options’) ) { // Plugin code here } I had a very quick look at the plugin code and … Read more
Found the solution. Forgot 2 lines of code. New is line 2 and line 11. I post the complete code: if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == “new_post”) { $file=$_FILES; // Funktion zum Image-Upload, falls sie noch nicht existiert if ( ! function_exists( ‘wp_handle_upload’ )) { require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); … Read more
I can’t find the proper hook, but there is alternative solution: to add style=”float:right” to all images in content, which have class=”alignright”: add_filter(‘the_content’, ‘my_add_image_float_right’); function my_add_image_float_right($content) { $pattern = ‘@(<img.+)(alignright)(.*)(/>)@Ui’; $replacement=”$1$2$3 style=”float:right” />”; $content = preg_replace($pattern, $replacement, $content); return $content; }
I use a plugin called AJAX Thumbnail Rebuild. It goes through all of the images in your media library and re-sizes them based on any image sizes registered (including the defaults and anything added with add_image_size()). It only runs when you manually request it and you can tell it to only rebuild certain sizes if … Read more
After adding new image sizes, you might need to rebuild your thumbnails. I have used AJAX Thumbnail Rebuild after encountering a similar issue, and it worked fine.
The Problem here lies within the Plugin, which utilizes the deprecated Function image_resize. I’m not 100% sure that this is the only Problem, but try rewriting the Plugin using the new [WP_Image_Editor][1] Class. The next Step to check is if the Plugin can write the files, and if the directory permissions are set correctly. See … Read more