如何为WordPress除首页外的所有页面设置页眉图片?
Hey there! Let's work through getting that consistent header image set up for all your non-home pages with the Astrid theme. Here are a few practical steps to try, since older theme versions can tuck settings in unexpected places:
Don’t stop scrolling after selecting Header Type
After choosing "Image" as the Header Type for non-home pages inAppearance > Header Area, keep scrolling down the same page. Often the image upload/selection field is hidden just below the type dropdown—look for sections labeled "Global Header Image" or "Non-Homepage Header Configuration" that might have been missed at first glance.Check the Customizer for global controls
Astrid sometimes places global header settings in the Customizer instead. Head toAppearance > Customize, then navigate to sections like "Header Settings" or "Header Media". There might be a dedicated option to set a default header image for all pages except the homepage here.Use Custom CSS as a reliable fallback
If the theme’s built-in settings don’t give you the option, custom CSS will get the job done. First, upload your desired header image to the Media Library and copy its URL. Then add this code inAppearance > Customize > Additional CSS:/* Apply custom header image to all non-home pages */ body:not(.home) .site-header { background-image: url('https://your-site.com/wp-content/uploads/your-header-image.jpg'); background-size: cover; background-position: center center; min-height: 300px; /* Adjust this to match your design needs */ }If
.site-headerdoesn’t target the right element, use your browser’s inspect tool to find the correct class for your header container (it might be.astrid-headeror.page-headerdepending on your theme version).Check for theme updates (with caution)
Since you’re on WordPress 5.2.4, you might be running an older version of Astrid. Head toAppearance > Themesto see if an update is available—just make sure to back up your site first, as older WP versions can have compatibility quirks with newer theme releases.
内容的提问来源于stack exchange,提问作者user2125853

