How to include different html tags in the header for different pages?

Just assign something to a variable and output that if(is_page(14) or is_page(16)) { $class_name=”bannerExp”; } if(is_page(18) or is_page(52) or is_page(22) or is_page(20)) { $class_name=”bannerD”; $somevariable=”test”; } if(is_page(27)) {$class_name=”bannerJ”;} if(is_page(25)) {$class_name=”bannerS”;} if(is_page(2)) {$class_name=”bannerH”;} <div class=”<?php echo($class_name);?>”> <?php (if $somevariable != ”) { echo $somevariable;} ?> That being said, this is a horrible way of doing things … Read more

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