Title: Featured Image as Title background
Last modified: March 4, 2024

---

# Featured Image as Title background

 *  [jmccrone](https://wordpress.org/support/users/jmccrone/)
 * (@jmccrone)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/)
 * Hi.
 * I am trying to update Page Titles so the Featured Image associated to the Post/
   Page is used as the background image instead of having to manually specify a 
   specific image as the page title background image. Don’t see an option for this
   in Customizer. Is this possible?
 * Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [surviving404](https://wordpress.org/support/users/surviving404/)
 * (@surviving404)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/#post-17474424)
 * Hello,
   you can navigate toDashboard> Appearance> Customize> General Options> 
   Page Title.Under style option use ‘Background Image’, after that it will give
   you the option to choose an image from media gallery.
 * I think this will help.
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/#post-17474473)
 * Hello [@jmccrone](https://wordpress.org/support/users/jmccrone/),
 * Thank you for reaching out,
 * If I understand your request correctly, from WP Dashboard > Appearance > Customizer
   > General Options > page Title, set a general page title styling with the background
   image.
    [https://postimg.cc/t1VTcPMc](https://postimg.cc/t1VTcPMc)
 * Then it’ll show that style on all pages/posts/etc.
 * Also, by going to your desired page/post and only setting the background image
   for the title in OceanWP Settings, that background image will be changed to a
   new one: [https://postimg.cc/4YHh9mgX](https://postimg.cc/4YHh9mgX).
 * For your information, There is an option for a single blog post, which can set
   the featured images automatically: [https://postimg.cc/mzYn2LDw](https://postimg.cc/mzYn2LDw).
 * I hope it helps.
    Best Regards
 *  Thread Starter [jmccrone](https://wordpress.org/support/users/jmccrone/)
 * (@jmccrone)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/#post-17475698)
 * Thanks. I saw those options but neither address my need which is to have the 
   Product Archives page pull in the archive (product category) image as the background
   image for page title. Doesn’t appear that is an option in the theme settings 
   in customizer. I see I can set a specific image as the page title background 
   for the entire site or specify a specific image for an individual Page or Post,
   but don’t see any option to make the background image of page title dynamic for
   Archive template.
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/#post-17480928)
 * Hello [@jmccrone](https://wordpress.org/support/users/jmccrone/),
 * Thank you for reaching out,
 * The category archive page(s) needs customization and add the background image
   by using code so that you can follow the steps explained in this link:
    [https://docs.oceanwp.org/article/459-alter-the-page-header-background-image](https://docs.oceanwp.org/article/459-alter-the-page-header-background-image)
   Also, for conditional tags, you can use the following articles [https://developer.woo.com/docs/conditional-tags-in-woocommerce/](https://developer.woo.com/docs/conditional-tags-in-woocommerce/)
 * For example, I used this one, and working well on my end:
 *     ```
       /**
        * Alter your page header background image
        *
        * Replace is_singular( 'post' ) by the function where you want to alter the layout
        * Place your image in your "img" folder
        */
       function my_page_header_bg_img( $bg_img ) {
   
       	if ( is_product_category( 'category-name' ) ) {
       		$bg_img = 'https://example.com/img/my-image.jpg';
       	}
   
       	// Retrun
       	return $bg_img;
   
       }
       add_filter( 'ocean_page_header_background_image', 'my_page_header_bg_img' );
       ```
   
 * Screenshot: [https://postimg.cc/dkz0Z3cx](https://postimg.cc/dkz0Z3cx).
 * I hope it helps.
    Best Regards
    -  This reply was modified 2 years, 2 months ago by [Shahin](https://wordpress.org/support/users/skalanter/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Featured Image as Title background’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.5/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Shahin](https://wordpress.org/support/users/skalanter/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/featured-image-as-title-background/#post-17480928)
 * Status: not resolved