Limit files uploaded per folder
Limit files uploaded per folder
Limit files uploaded per folder
Transfered live site to new server and images are not showing
You could start with this : add_action( ‘comment_form_logged_in_after’, ‘wpse_102612_additional_fields’ );// only for logged users function wpse_102612_additional_fields () { echo ‘<p class=”comment-form-upload”>’. ‘<label for=”upload”>’ . __( ‘Upload your file’ ) . ‘</label>’. ‘<input id=”upload” name=”upload” type=”file” size=”30″ /></p>’; }
See my answer here: The Media Library lives in both wp_posts and wp_postmeta. wp_postmeta contains the image URL wp_posts contains an entry for each image insertion into a post, along with the post ID. Exporting and importing these 2 tables as SQL did not work for me – I received ‘duplicate entry for key 7’… … Read more
That’s shortcode with the brackets stripped. And since shortcode is either rendered or removed before output, it suggests that these descriptions are not merely being “scraped” from your site, but provided by a WordPress plugin or locally-hosted script. I would first check your theme is not “leaking” raw shortcode; do you see something like [caption…] … Read more
you need to echo it. example: <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘full’);?> <img src=”https://wordpress.stackexchange.com/questions/105201/<?php echo $src[0] ?>” />
if you have the attachment (image) id, you ca use : wp_get_attachment_image_src( $attachment_id, $size); where $size is the smaller version you want. (see http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src) If you don’t know the attachment id you may query the database for full image size url : http://pippinsplugins.com/retrieve-attachment-id-from-image-url/
WordPress creates 3 different sizes as far as my research goes. Read this on WP image handling -> http://www.studiograsshopper.ch/web-development/wordpress-featured-images-add_image_size-resizing-and-cropping-demo/ You can easily customise the default Media sizes by changing the default sizes in Dashboard > Settings > Media. You can grab any of those sizes. See the codex @ http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail The function you want is: … Read more
If your server has the right libraries the images are resized on upload so the public facing load time should not suffer. You can add image sizes with add_image_size and retrieve those specialize sizes with functions like get_the_post_thumbnail or get_attachment_image_src, among others. There are also a lot of post here about image sizes. You may … Read more
I don’t have time to produce working code for this. I will edit the answer if I get the chance. In the meantime, you probably want a filter on upload_dir to alter that path. Your code would look something like this then: function alter_upload_wpse_107016($upload) { remove_filter(‘upload_dir’,’alter_upload_wpse_107016′); // alter $upload array return $upload; } if (1 … Read more