How to display the Media Library Items Upload date

If you have the attachment ID, you can just use get_the_date(): <?php echo get_the_date( ”, $attachment_id ); ?> If you leave the first argument blank, e.g. ”, then it will use the date format from settings. If you don’t want that, then provide a PHP date format.

Hide or mask the url to an image

I don’t believe this is possible. Images are ‘replacement items’ generated by the browser. They’re not IN the html, they’re CALLED by the html. If the reference is wrong, the image will never show. If the reference is right, the image will show… but it will be accessible to the visitor. In other words, if … Read more

Custom Image Widget

There seems to be no official hooks that effect media widgets. It is possible to access the properties of the widgets in the sidebar using the dynamic_sidebar_params hook in combination the $wp_registered_widgets global widget array. However, there is no image widget property for setting the inline styling of the image. Therefore the simplest solution to … Read more

WordPress loading all local images from specific directory?

get_stylesheet_directory was necessary for the glob function to work, you need a combination of both, e.g. fetch the files in that directory: $imagePath = get_stylesheet_directory() . “/IMAGES/sponsors/”; $filesList = glob( $imagePath . ‘*.{JPG,jpg,PNG,png}’, GLOB_BRACE ); and display the files at that URL: $imagePathURL = get_stylesheet_directory_uri() . “/IMAGES/sponsors/”; … echo ‘<img src=”‘ . esc_url( $imagePathURL . … Read more