Articles of images

How to get current image's slug in WP_image_editor?

I’ve been writing some class and functions to modify the path of thumbnails. I extended the original WP_Image_Editor class to achieve custom structure. What i want: to store the thumbnails in different folders based on their slugs, in the upload directory. such as : What i have already done: class WP_Image_Editor_Custom extends WP_Image_Editor_GD { […]

Change Default Image HTML

I am making a WordPress theme and want to change the default image html. For example if you upload an image using WordPress uploader it generates the following html for your images <a href=”image_url_goes_here”> <img class=”aligncenter size-full wp-image-100″ src=”your_src”/> </a> I want to change it to something like this <div class=”image-container”> <img class=”aligncenter size-full wp-image-100″ […]

Warning: getimagesize() : http:// wrapper is disabled in the server configuration by allow_url_fopen=0

Question What are all the files that I have to modify to get this to work? Background I have been searching stackoverflow for similar answers. Most talk about modifying something called a php.ini file. Which i have not been able to locate. But is that actually the case for WordPress themes? I installed the Aqueduct […]

Can I stop wordpress generating media sizes

I am using atelier theme on a shop website and I have seen the disk space grow rapidly. In my analysis, I have noticed that Atelier is creating 17 different media sizes when it uploads an image: thumbnail – 150×150 medium – 300×300 medium_large – 768×9999 large – 1024×1024 shop_thumbnail – 180×180 shop_catalog – 800×800 […]

JavaScript and images files are not recognized

It might be the simplest question but I can’t find why my JavaScript files and images are not recognized by WordPress. I put all my JS files and images in my theme’s folder, so I created a folder “word” inside “theme”, with all the content and then I added my files. But the website doesn’t […]

How to get only text from wordpress post content?

I have been using wordpress for my projects. For my homepage of the site I need to display limited text from the post content and the content contains images as well. To display the 100 text i have used substr function of php. What happens here is that the text as well as image is […]

How can I receive the image id using the media box?

The code below allows me to retrieve the image string, when Insert to Post has been pressed, but what would be the correct way to retrieve the ID of the image? So I can retrieve all information through wp_get_attachment_image_src? jQuery(document).ready(function() { var form_field; var upload_field_ID = ”; jQuery( ‘.upload_image_button’ ).click( function() { jQuery( ‘html’).addClass( ‘Image’ […]

Theme currently showing thumbnails, how to show full size?

My theme, Grisaille, currently shows thumbnails in the post preview on the “home” page. How do I make it so that full size images show both on the “home” page and on the individual post? functions.php: <?php if ( ! isset( $content_width ) ) $content_width = ‘590’; /** * Add Menu Support **/ add_theme_support(‘automatic-feed-links’); register_nav_menu(‘main’, […]

get_children() not working properly – Only on one post?

Client wants to show how many images await the reader in a post. I say: easy peazy. Now I realize: I lied. The system only uses galleries, even for single pictures. $images = get_children(array( “post_parent” => $post->ID, // $post->ID gives the right ID. “post_status” => “any”, “post_type” => “attachment”, “post_mime_type” => “image” )); count($images); // […]

How to resolve – IE 6 ignores img “width” properties

In this post: בהדונס אבן-גבירול We’ve got 4 images set (in the img property) to a width of 246 pixel. In chrome it looks fine. In IE6 it doesn’t. Any suggestions on how to solve this?