Custom Background Image per Page

You really just need to check the source. get_background_image() uses get_theme_mod(), which applies the theme_mod_{$name} filter. So… function alter_background($name) { // return something apporpriate for the theme mod } add_filter(‘theme_mod_background’,’alter_background’); Note: the “name” component may be different. Use var_dump(get_theme_mods()); to work out what you need.

How to get some information from the_content [closed]

You could initialize the video shortcode – – with the function do_shortcode. Exemplary usage would be like this: echo do_shortcode( ” ); Extra information: I have given an extensive answer to a similar question a couple of weeks ago. You should take a look I’m certain it will help you out. Especially if you still … Read more

How do you change all images dimensions to have the same size?

Register a new image size with add_image_size( $name, $width, $height, $crop ). // Hard crop left top add_image_size( ‘custom-size’, 160, 90, array( ‘left’, ‘top’ ) ); Then use a plugin like Regenerate Thumbnails which will automatically create the new sizes on your server. You can also make your custom sizes selectable from your WordPress admin. … Read more

How to include featured image on blog post preview?

You can edit the default image sizes that WordPress creates by going to Settings -> Media in your WordPress dashboard and specifying image sizes. However, this will change the default image sizes and will affect all images across your site. Another option is to edit the template file that is displaying your blog (likely home.php … Read more

Font size on image captions on mobile

Please Use font-size: 2.5vw; it is responsive and set according to size. .wp-caption .wp-caption-text { **font-size: 16px** !important; color: #000000; text-align: center; background-color: #F2F2F2; padding-top: 1px; margin: 1px; }

Image not showing in an archive page

Most of this code is unnecessary. Remove everything inside the foreach from your question and just use: foreach ( $recent_posts as $recent_post ) { $image = get_the_post_thumbnail( $recent_post, ‘medium’ ); // etc. }

Stop underlining image links

By definition it isn’t really hyperlinked image. It is hyperlink tag a that contains image tag img. Most probably it is a link that is really underlined, image is just inside it. You need to create new CSS rule that matches your link with image and specifies no underline (it could also be border-bottom property … Read more