header_image() with CSS

No, in general, it’s not possible to use php in CSS. But you can set background image in php file. Like.. <div class=”headerimg” style=”background-image: url(<?php echo header_image(); ?>)”></div> Then in CSS file using class you can set all the other properties you need like height, width, background-position and so on.

Header background image just stopped working

Your tag is using 2 identifiers instead of one id=”masthead masthead_custom” class=”masthead_custom” id=”masthead” will correct your problem. #masthead.masthead_custom { background-image: url(“./bg.jpg”); background-color: #444; height: 100vh; background-position: center; background-repeat: no-repeat; background-size: cover; opacity: 0.6; position: relative;; z-index: 999999; } Tell me if it works.

Resize header image

This is an inline CSS from source code, normally it’s because there is somewhere in the theme options where you can upload an image for header and the code was written to process that case by inserting an inline CSS directly. If you already found that line of code in header.php then you can replace … Read more

Howto keep header image when changing theme

Here comes the plugins to rescue, move that code into a plugin and activate. That’ll not change header image upon every theme change. E.g – <?php /* Plugin Name: keep header always */ // Your code to keep header image ?> save it as whatever-foo.php upload to /wp-content/plugins/ directory and activate it

Changing Header scroll height for Twenty Seventeen theme on ALL pages

from that question you mentioned, this is the code: .twentyseventeen-front-page.has-header-image .custom-header-media, .twentyseventeen-front-page.has-header-video .custom-header-media, .home.blog.has-header-image .custom-header-media, .home.blog.has-header-video .custom-header-media { height: 1200px; height: 100vh; max-height: 100%; overflow: hidden; } Revision: Try removing home and front-page from the selectors for your specific use: You can use this to replace what you put in and it will cover the … Read more

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