Tag Info

New answers tagged

0

Change upload directory for PDF Files seems to be a good stepping stone forward. Although untested, looking at the code my adaptation would be along the lines of... <?php add_filter('wp_handle_upload_prefilter', 'custom_media_library_pre_upload'); add_filter('wp_handle_upload', 'custom_media_library_post_upload'); function ...


0

If those images have been inserted in your posts, deleting them from the Media Library will cause blank spaces with a broken image icon to appear in your posts. If you need/want to add alt text or change image file names, etc., better to do so directly in the Media Library than to delete existing images and then upload them again. If you do this, you will ...


-1

In the simplest way, you can use like this to show on home page: <?php if( is_front_page() ) { include('slider.php'); } ?> Thanks


0

See if either of these plugins helps you do that: Custom Field Template or Mandatory Fields. If not, it might require changes to a theme's functions.php. Hopefully, you don't have to change anything in the core WordPress files - that can be quite risky.


0

Instead of removing upload script you can make the upload error out if the user does not have admin privileges. Like this- function tomjn_only_upload_for_admin( $file ) { if ( ! current_user_can( 'manage_options' ) ) { $file['error'] = 'You can\'t upload images without admin privileges!'; } return $file; } add_filter( ...


0

How will you represent the galleries on the new site? Will each gallery be a post with a standard [gallery ids=...] shortcode? If so, you'll basically only need the url for each image on the old site (plus post heading/text and image descriptions if needed), and you can create a WXR import file to import everything into the new site. Example, an import ...


3

This can be done using a front-end developer's skills. What i achieved through the customization is as follows. Through the following code: <?php add_thickbox(); ?> <div id="my-content-id" style="display:none;"> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script ...


0

If some one it's still looking for a solution, this solution worked for me for all upload images in any post types and on featured images as well: function upload_media_manager_by_default() { if ( did_action( 'wp_enqueue_media' ) ) { ?> <script type="text/javascript"> jQuery( document ).ready( function ( $ ) { ...



Top 50 recent answers are included