WordPress Javascript displaying an image Question

You need to call wp_enqueue_media() else the wp object won’t have a media option. For example, go to WP Admin and pull up the JS console and type wp.media on the dashboard, it won’t work. Try again on the media page, and this time it will work. https://codex.wordpress.org/Javascript_Reference/wp.media To be able to use the JavaScript-API, … Read more

WordPress can’t detect any thumbnails size?

Sounds like a plugin is interfering with the WordPress media features. If possible, try deactivating the media/image plugins and see if anything changes. You can also consider reinstalling the WordPress (wp-admin/update-core.php) It is recommended to back up your site before doing this.

Use wget to find used images

Your asking for command line solution, I don’t have one – but for PHP you can cycle through all posts, build an array of files, compare it to an array of the media library, find unused and delete. Cycle through Posts use get_posts() for pages andor posts, and build your foreach loop Extract Media From … Read more

How can we achieve this image css style?

CSS Approach: For a purely triangular corner in css, see this blog post Code a Simple Folded Corner Effect With CSS or this Folded Corner example on Codepen You can then add the rotated “Answer” text as an absolutely positioned div with the css transform: rotate property. However, if you absolutely have to the curled … Read more

add_image_size limiting sizes (???)

WordPress has its own built-in image sizes. These sizes are: thumbnail // Thumbnail (default 150px x 150px max) medium // Medium resolution (default 300px x 300px max) medium_large // Medium-large resolution (default 768px x null max) large // Large resolution (default 640px x 640px max) The medium-large image size has no height set, meaning that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)