wordpresswordpress-thesis-theme

How to Change the dynamic header image for the one template for each page in wordpress? If anyone can help for 4.4 version of wordpress


I am creating wordpress theme by scratch so I am facing problem with template , Becouse I am using only one template for each page for speed improvement .


Solution

  • For each page , you have $post object available.

    You than need to use get_the_post_thumbnail($post->ID,'large'); in the while(or any custom) loop to get the banner.

    You also can create custom meta field by Advanced custom fields plugin

    get_post_meta($post->ID,'banner',true);