Title: Custom Header
Last modified: August 21, 2019

---

# Custom Header

 *  [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/)
 * Hello,
 * How do I place the custom header on a woo-commerce product category page.
    I 
   have been able to do it on All other woo commerce pages (shop, cart, single product
   etc ) except the product categories page. Please help
 * Thanks so much.

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

 *  [Alex de Borba](https://wordpress.org/support/users/alexdeborba/)
 * (@alexdeborba)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11857375)
 * Hello,
 * In general, meaning sitewide, then head to Customise > Header > General, dropdown
   the menu below Style, and select Custom Header and it will open the Select Template
   option, click on – Select – to assign the proper template from your Theme Panel
   > My Library.
 * If somehow, you did this and it did not assign to specific WooCommerce pages,
   then open Theme Panel > My Library, and check if you have your header Conditional
   Logic set to display on all pages, or specific ones, and alter as you wish.
 * Hope this helps.
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11857557)
 * Hello,
 * Can you share your site link so that I can check it? Try adding the below code
   to the oceanwp child theme’s functions.php file.
 *     ```
       function prefix_header_style($style) {
           if ( is_product_category() ) {
               $style = 'custom';
           }
           return $style;
       }
       add_filter('oceanwp_header_style','prefix_header_style');
       ```
   
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11866869)
 * Sure Amit, would you be okay with a staging site username password (only for 
   viewing?)
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11867080)
 * Okay, have you tried the above code?
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11867102)
 * Amit, I am terribly scared and inexperienced about child’s theme usage and I 
   am way too ahead in the design. So I was recommended using code snippets for 
   custom functions
    How do I use the code there? I tried one, and activated it 
   but it still doesnt work. Please help.
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11867155)
 * Do I have to prescribe a location in the code? could you help?
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11867212)
 * Which code snippet plugin are you using? I’ll recommend using the child theme
   instead of a code snippet plugin. What will happen when you have added wrong 
   code in the code snippet plugin and the site crash? There is no way to recover
   it without deleting the plugin using cPanel/FTP. So all your codes added to the
   code snippet plugin will be lost.
 * Using a child theme is a safe way to add/edit the code and modifying the theme
   file easily – [https://docs.oceanwp.org/article/90-sample-child-theme](https://docs.oceanwp.org/article/90-sample-child-theme)
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11867682)
 * using this one [https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)
   
   My fear is that if I switch from parent theme to child theme and then back again,
   I would lose every customisation I have made on the parent theme so far. :/
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11869704)
 * No, you will not lose anything if you haven’t edited the theme files. You can
   easily import all the customizer settings to the child theme – [https://docs.oceanwp.org/article/505-import-the-parent-theme-customizer-settings-into-your-child-theme](https://docs.oceanwp.org/article/505-import-the-parent-theme-customizer-settings-into-your-child-theme)
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11869842)
 * Okay. but what about the widgets on the side bar etc, elementor settings, . the
   settings in them? will it duplicate that too?
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11873515)
 * Yes, don’t worry. You can test it on a staging site if you have doubt.
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11908440)
 * Hi Amit, so what happens after I put this code in child function.php. how does
   it know which custom header to use on the product category page ( I have two 
   custom headers to choose from) . Does it appear as a hook option to activate 
   somewhere ? I ask Because categories are not editable pages.
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11913536)
 * I think I misunderstood your question. There is no way to set the different custom
   header for different page. The above code is for that custom header template 
   which you have selected from the Customize > Header > General section.
 *  Thread Starter [anusha75](https://wordpress.org/support/users/anusha75/)
 * (@anusha75)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11914626)
 * I shall be in touch about this after I go live 🙂 I think you will see the problem.
   The product category page of woocommerce does not take the custom header prescribed
   to the shop page. (its there on cart, single product, checkout, etc, just not
   on product category)

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

The topic ‘Custom Header’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/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/)

 * 14 replies
 * 3 participants
 * Last reply from: [anusha75](https://wordpress.org/support/users/anusha75/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/custom-header-69/#post-11914626)
 * Status: not resolved