Tag Info

Hot answers tagged

4

A workaround by extending the WP_Image_Editor_GD class The problem is how to access the image sizes before we change the quality of intermediate jpeg images. Note that the image_resize() function is deprecated. We can use the jpeg_quality filter from the public get_quality method of the abstract WP_Image_Editor class: $quality = apply_filters( ...


3

Try removing (image), like this: <?php $content = get_the_content(); $content = preg_replace("/<img[^>]+\>/i", " ", $content); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; ?>


3

Take a look in the source code, and you'll see the body tag on every page and/or post has a unique class associated with it (postid-1241 for example). Select that class and change the background image there. Example: body.postid-1241 { background: url(http://example.com/bg.png) fixed; }


2

That's a lot of unattached images. If you have couple of hundred images then you can delete them manually from media library. 1. Click 'Screen Options' at the top right and set 'Show on screen' to 200. 2. Click 'Apply'. 3. Click the checkbox just under 'Bulk Actions' to check all images on the page. 4. Select 'Delete Permanently' in the 'Bulk Actions' ...


1

never saw this hack before, but that is all it is - a hack. While it might work at some situations, wordpress core do not officially supports (yet) having two domains on one network install, and therefor YMMV to what will work and what not. You are much safer having two different installs then taking this path.


1

This happened to me. I installed a thumbnail regenerater plugin, this seemed to do the job for me.


1

You'll need to do 2 things. First, filter the current media columns. add_filter('manage_media_columns' , 'newMediaColumnNames'); function newMediaColumnNames( $columns ) { //remove the old column - optional unset( $columns['parent'] ); //add a new one to take it's place $columns['new_uploaded_to'] = __('New Uploaded To'); return ...


1

WordPress uses the attachment filename to create the attachment post slug. If your file was named something else, there would not be any conflicts. If you have your post permalinks set to /%postname%/ , and you upload an image FIRST, and then create a post SECOND, then WordPress has to make a choice between the two when someone tries to access the ...


1

You can use add_image_size() function to create custom sized images. You only need to paste some piece of codes in your functions.php and then update the template files accordingly. For example : add_image_size( 'category-thumb', 300 ); // 300 pixels wide (and unlimited height) add_image_size( 'homepage-thumb', 220, 180, true ); // (cropped) And you ...



Only top voted, non community-wiki answers of a minimum length are eligible