Title: [Plugin: Dynamic Headers] need some help using this with CSS
Last modified: August 20, 2016

---

# [Plugin: Dynamic Headers] need some help using this with CSS

 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-dynamic-headers-need-some-help-using-this-with-css/)
 * basically my theme doesn’t contain the header, the header is simply dictated 
   by CSS.
    the element is called #header-container and the css declaration background-
   image is adding the header image to it.
 * in the plugin’s notes I found method 2:
 *     ```
       <?php
       if(function_exists('dh_get_page_image_url')){
       $dynamic_header_url = dh_get_page_image_url();
       }
       ?>
       ```
   
 * I do understand what this does but how do I get the URL into my CSS? Or would
   I need to add the css style declaration into my header.php with method 2 using!
   important to overwrite the style.css?
 * besides, how could I add an IF statement to the above code so that only if a 
   page has a header image assigned to it it will be displayed and if it hasn’t 
   the default one will be used?
 * [http://wordpress.org/extend/plugins/dynamic-headers/](http://wordpress.org/extend/plugins/dynamic-headers/)

The topic ‘[Plugin: Dynamic Headers] need some help using this with CSS’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dynamic-headers.svg)
 * [Dynamic Headers](https://wordpress.org/plugins/dynamic-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dynamic-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dynamic-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/dynamic-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dynamic-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dynamic-headers/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-dynamic-headers-need-some-help-using-this-with-css/)
 * Status: not resolved