Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #83830
    pal_coche
    Participant

    Hello all:

    I have a blog posts page and I would like to add a personalized header to it that only shows up on that particular page. However, the options available in the wordpress customizer don’t include just the blog page.

    In other words, I only want it to be set up on one page (that is, the blog page) and for it not to appear on all the other pages.

    What can I do?

    #83851
    Mahesh
    Keymaster

    Hi @pal_coche,

    Assuming you are trying to display the header image in Blog Post Page ONLY.
    For the above, you’ve to create child theme, you can find more details on creating child theme HERE. Then in child theme’s functions.php, add the following codes.

    /**
     * Display header image in blog page only
     *
     */
    function catchbase_featured_overall_image() {
    	if ( is_home() ) {
    		catchbase_featured_image();
    	}
    }

    Note: This will override the header image function of the Main theme and will display the header image on blog page only. Adding this function, Enable Featured Header Image on in Header Image of customizer won’t work as it is being overridden.

    Regards,
    Mahesh

    #83852
    pal_coche
    Participant

    Thanks for your quick reply Mahesh.

    Can I just enter the code in the Customizer –> Custom CSS?

    #83860
    Mahesh
    Keymaster

    Hi @pal_coche,

    I am afraid its not possible with Custom CSS. You need to do it creating child theme and add the above code in child theme’s functions.php.
    Sorry I forgot to put the link to the detail page on creating child theme. Please visit this LINK.

    Regards,
    Mahesh

    #83867
    pal_coche
    Participant

    Ok. Once I create the child page I will check back on here to give you an update. Thanks again.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Display Header Image on Blog Posts Page Only’ is closed to new replies.