Grab header image description from hardcoded description in functions.php or custom header additions and return it for usage in template files. Primary support Twenty Ten and Twenty Elevent themes, but others is also supported.
If header image does not have description (uploaded image), blog name and tagline is used.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Add to template file
<?php header_image_desc(); ?>in place where you wish to print out header image description.
- Why this extension?
To provide valid XHTML code with dinamic header image description.
- Where to add this code?
header.phptemplate file, find line
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />(line 77 in Twenty Ten and 94 in Twenty Eleven), and replace
alt="<?php header_image_desc(); ?>".
You can also add
title="<?php header_image_desc(); ?>"before img closing tag
/>, so on hover header image visitor get description in tooltip.
Contributors & Developers
“Header Image Description” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Initial release