Exclude images uploaded via meta boxes from WordPress gallery
Get all of the attachment IDs from your meta fields, put them in an array, and pass that as exclude parameter of get_posts.
Get all of the attachment IDs from your meta fields, put them in an array, and pass that as exclude parameter of get_posts.
The issue was that half of the site still used the old wp-content for images under this method so I ended up changing the wp-admin doing a find and replace instead of a htacess redirect.
You can check out the following plugins that use an external storage for media. Some of them supposedly use the build in media (S3), while other simply allow you to use the storage in your post (azure) via a button. http://wordpress.org/extend/plugins/windows-azure-storage/ , yes Microsoft wrote this plugin. http://wordpress.org/extend/plugins/tantan-s3-cloudfront/ Amazon S3 for WordPress. http://wordpress.org/extend/plugins/cdn-sync-tool/ Several services(cloudfiles, … Read more
If you are never going to use the attachment page, then you can simply change the HTTP header ( a php function ) of attachment page to the image file. Example – header(‘Location: ‘ . wp_get_attachment_url() ); Note – Call it inside WordPress loop.
This tutorial explains basic use of WordPress media uploader. http://wp.tutsplus.com/tutorials/creative-coding/how-to-integrate-the-wordpress-media-uploader-in-theme-and-plugin-options To add image sizes use <?php add_image_size( $name, $width, $height, $crop ); ?> Read more on this at Codex http://codex.wordpress.org/Function_Reference/add_image_size
edit_attachment Runs when an attached file is edited/updated to the database. Action function arguments: attachment ID This is found deocumented in the Codex under the Action Reference. Please take a closer look at the Codex before posting questions related directly to syntax. 🙂
I wrote a plugin named »Dynamic Image resize« for exactly that purpose. It features a template tag and a shortcode (that takes the exact same amount of arguments, the template tag takes. // The args need to be an array dynamic_image_resize( array( // The full path to the image in your uploads folder ‘src’ => … Read more
First you’ll need to upload the image, like this. This will upload the image and add a row to wp_posts where your attachment is. How dynamic do you need this to be? Can you upload the image with the user interface or does that have to be done programatically as well? In your case, the … Read more
You can show featured images at multiple sizes easily enough, by specifying the size of image when you make the call, but if you want them to be different you can use the code in this plugin: http://wordpress.org/extend/plugins/multiple-featured-images/ Here’s a tutorial: http://lifeonlars.com/wordpress/how-to-add-multiple-featured-images-in-wordpress/ e.g. Example registration: if (class_exists(‘MultiPostThumbnails’) { if (MultiPostThumbnails::has_post_thumbnail(‘folio’, ‘feature-image-2’)) { MultiPostThumbnails::the_post_thumbnail(‘folio’, ‘feature-image-2’); } … Read more
Well programmers can make use of the prettyPhoto documentation and modify the plugin after the wp_footer() call in footer.php: Add the button via image_markup Give prettyPhoto a little height boost after adding the Download button. <?php wp_footer();?> <style>.download-btn{ margin-top: 10px; padding: 5px; background: #ccc; float: left }</style> <script> jQuery(document).ready(function() { jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto({ image_markup: ‘<img id=”fullResImage” src=”https://wordpress.stackexchange.com/questions/68012/{path}” … Read more