Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #47013
    Boaz
    Member

    Hi,
    i would like to change the header image which appears in one of my plugins inner pages.currently it uses the default image.
    im using a query to determine a certian condition and then id’e like to change it.
    in my child theme i created a function that hooks to the “catchevolution_after_header” trigger.
    what function can i use to the change the header image at this stage?
    is it “set_post_thumbnail()” or something else ?
    thanks

    function change_tribe_events_head() {
     
    	if ( tribe_is_event_query() ) {
    	   //change header image here
    	} 	
    }
     
    add_action( 'catchevolution_after_header', 'change_tribe_events_head');
    #47037
    Sakin
    Keymaster

    @Boaz: For header featured image we have two function one is catchevolution_featured_page_post_image() for post/pages header image and catchevolution_featured_image() for default header image. Then these are controlled through catchevolution_featured_overall_image() functions.

    In your child theme you can copy these functions and edit it as per your need. No need to use action hooks as this functions is wrap with if ( ! function_exists() ) condition and this make your child theme function to overwrite the parent theme functions.

    #47144
    Boaz
    Member

    thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘changing header image using a hook’ is closed to new replies.