how to replace embedded “full” sized images within a post with the “large” ones

I solved my own problem by using the creating a page using the following template. Just create and visit the page using the template below. You will only be viewing the results with primitive pagination, follow the code and it’s easy. Changes will not be saved until you visit /whatever-permalink-you-have/?updating=true Caution Please backup your database … Read more

Populate a slideshow list of images from images in a wordpress page?

Most of this is part of the Codex: <?php $attachments = get_posts(array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ =>’any’, // This is where you specify the ID of your private image page ‘post_parent’ => $private_page_id, )); if (count($attachments)) { // We have attachments ?> <ul id=”flexiselDemo3″> <?php // Now we loop through them foreach … Read more

Confusion about arguments sent to add_image_size

As @PieterGoosen said, your point is valid. A look into the source confirms that the codex description of add_image_size was wrong there. It was, because I changed it to be correct. That said, everyone can help improving the codex, you just need to register. You might want to take a look at Contributing to WordPress … Read more

Validate Uploaded Image using WordPress’ Built-in Functions?

All of the code in your question can be replaced with: require_once( ABSPATH . ‘wp-admin/includes/image.php’ ); require_once( ABSPATH . ‘wp-admin/includes/file.php’ ); require_once( ABSPATH . ‘wp-admin/includes/media.php’ ); if ( $_FILES ) { foreach ($_FILES as $file => $array) { $image_post_id = media_handler_upload( $file ); if ( is_wp_error( $image_post_id ) ) { $error .= $image_post_id->get_error_message(); } else … Read more

Plupload resize for worpdress

I’ve done a Plupload using the Front End. The WordPress Plupload is very customised, so I’ve implemented from the scratch as a Plugin. I’ll show an example using functions.php Download the Plupload from http://www.plupload.com/download/ and put in your theme inside a js/thirdparty/plupload/{all_files} Code to use on functions.php //Plupload File wp_enqueue_script( ‘plupload’, get_template_directory_uri() . ‘/js/thirdparty/plupload/js/plupload.full.min.js’, array( … Read more

How to show only posts with images?

No need for post IDs what has no thumbnail. Use meta query to get only those what has thumbnail. Add meta query function get_only_posts_with_images( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘meta_query’, array( array( ‘key’ => ‘_thumbnail_id’ ) ) ); } } add_action( ‘pre_get_posts’, ‘get_only_posts_with_images’ ); Or use custom query. $query … Read more