Use this for the alt=""
attribute on the custom header <img>
tag …
alt="<?php
$attachment_id = get_custom_header()->attachment_id;
$alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
if ( count( $alt ) ) echo $alt;
?>" />
… and then just edit the media attachment and add the alt text.
Related Posts:
- How to edit codes of an individual page/post?
- How to use a svg as custom header?
- How to add text to header below title but above nav
- Different Header Files WordPress
- Remove an uploaded header image
- Is there a way of registering a default logo image for custom-logo?
- Want to create Custom Header based on Geo Location
- Add additional upload field to Custom Header page
- Change position of header image with default 2019 theme
- Include different scripts and styles for two separate custom headers?
- Different header image ‘Home’ and Pages
- Custom page html headings plugin?
- I want to add my website name in wordpress source code like this
- My custom header does not change the header image height and width
- Embed Form In Header
- Include an infogr.am link in header of twenty seventeen theme
- Disable header banner on specific Posts
- How to add custom header to Twenty seventeen single post in wordpress
- Trying to put text and links into a header
- Child theme does not override parent theme values (custom-header)
- WordPress 4.4.2, _s starter theme, problems with custom default header
- Add a wrapper in the header
- How to create a custom header?
- How to display the link that says “Edit Header Image” on header image
- What would be the best method to code heading/title for ul or ol, Like we have caption in table?
- How can i get the name parameter defined in get_header?
- Adding custom fields to the header.php
- Additional Option on Custom Header admin
- Stylesheet switching and caching
- Block Editor: add an aria-label to an option inside a SelectControl
- Custom text-only header
- How to make WordPress blog accessible for people with disabilities?
- How can I add a custom header to a custom template in a plugin without using the theme folders
- Get a sidebar at the top of the page
- How to remove header images from all pages except the home page? skeleton theme
- Different custom header image on different page
- Custom header images won’t appear when set to random
- Accesibility problems with dropdown menus in twentyten theme or others
- Loss of sharpness in jpg imported as header in twentyeleven
- Mysterious HTTP 404 header in my own scripts
- How can I make a site viewable in multiple languages?
- Change location of header.php and footer.php
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- How to Edit the style of header title of Twenty Eleven Theme?
- adding meta data using plugin to top of head
- How to change the wordpress navigation bar UL to OL in Twenty_Twelve similer theme
- Header Slideshow [duplicate]
- Changing custom logo link
- Hide header texts (Title & Tagline) in custom-header.php
- Why I am getting Parse error: syntax error when I use ‘wp_is_mobile’?
- How to add screen reader text to links inserted in the block editor?
- Remove elementor header and display default theme header
- SlickNav – Google Lighthouse Accessibility issue for collapsed menu button
- Determine what pages are in my header [closed]
- How to output php between header and woocommerce container
- My menu bar dissapeared with autooptimize [closed]
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Additional custom header image
- get_search_form() and aria_label
- header_image not returning header image url
- is_page_template showing partial results
- Resources won’t load if not logged to cPanel after migration, cause?
- Custom header image, and content, on Posts Page in twentyeleven with Static Front Page
- Page header menu links change
- navigation doesn’t work in custom header.php
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- Custom Header added within Dashboard pages, is this possible with custom template files?
- Enable accessibility mode in widget as default
- How to enable admin to upload multiple images to support header carousel slider theme in WordPress?
- Add helper text in custom-header section in admin
- On the online version of my blog posts disappear
- How to add markup to the wp-custom-header div
- How to make custom_header_setup() image as background image?
- sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
- WordPress Multisite header img src is lost from staging to production
- Dynamically changing logo on scroll function [closed]
- Automatically generate multiple image sizes for element
- Different custom header video on different pages
- Remove all link title attributes
- Adding theme support for a custom header image
- Dynamic Title for custom post types
- Display the current post author and his url in the post header
- Trouble with responsivitizing my twentythirteen header
- Set header for default posts page?
- header specific meta box result detect url
- Custom Menu based off custom header
- Custom header shows two or three or more images
- Creating a custom header
- Blog page is not showing properly
- Multiple Custom Headers
- How can I add a google play badge to my header and footer?
- How to laod wp_enqueue_style to another header i created my self
- Modify a Themes Appearance >> Header admin screen from a plugin
- How to implement a custom sliding banner? [closed]
- Editing Header with a Page Builder [closed]
- How do I access the contents of WordPress Classic editor in admin area with JavaScript?
- Gutenberg: Issue trying to commit locally
- Create custom API endpoint to change custom header image
- Apply walker_nav_menu_start_el but only to one menu
- Editing alt text in media library