How to get the Page featured image, not the Post featured image

You might be able to do this by calling wp_reset_postdata(); otherwise you will need to get the blog page ID and set that on the line before instead: if ( is_home() ) {$post_id = get_option( ‘page_for_posts’ );} else {$post_id = $post->ID;} $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), ‘header-large’ ); ?> Note the is_home() is actually used for … Read more

How Change WordPress header image from admin menu

To be honest I don’t fully understand why you need this custom code to upload images, it should be possible with the default settings. To answer your question: If you dig a bit through the code, you’ll see that header_image() calls get_header_image() and returns that get_header_image() calls get_theme_mod(‘header_image’, …) and will return that (as long … Read more

Changing Header scroll height for Twenty Seventeen theme on ALL pages

from that question you mentioned, this is the code: .twentyseventeen-front-page.has-header-image .custom-header-media, .twentyseventeen-front-page.has-header-video .custom-header-media, .home.blog.has-header-image .custom-header-media, .home.blog.has-header-video .custom-header-media { height: 1200px; height: 100vh; max-height: 100%; overflow: hidden; } Revision: Try removing home and front-page from the selectors for your specific use: You can use this to replace what you put in and it will cover the … Read more