Add "Archive Banner" feature. Conceptually similar to #328.
A consistent banner image with title will display at the top of all WordPress archives.
For the title, we'll need to create a function to get an archive title. Similar to what was recently removed.
Add to theme options: Upload an image and set how to display it (similarly to a user setting up the featured image on a page or post). Also have a for setting the transparent header.
For reference, here was the original themeblvd_archive_title() function we can use as a starting point:
/**
* Display title for archive pages
*
* @since 2.0.0
*/
function themeblvd_archive_title() {
global $post;
global $posts;
if ( $posts ) {
$post = $posts[0]; // Hack. Set $post so that the_date() works.
}
if ( is_search() ) {
// Search Results
echo themeblvd_get_local('crumb_search').' "'.get_search_query().'"';
} else if ( is_category() ) {
// If this is a category archive
// echo themeblvd_get_local( 'category' ).': ';
single_cat_title();
} else if ( is_tag() ) {
// If this is a tag archive
echo themeblvd_get_local('crumb_tag').' "'.single_tag_title('', false).'"';
} else if ( is_day() ) {
// If this is a daily archive
echo themeblvd_get_local( 'archive' ).': ';
the_time('F jS, Y');
} else if ( is_month()) {
// If this is a monthly archive
echo themeblvd_get_local( 'archive' ).': ';
the_time('F, Y');
} else if ( is_year()) {
// If this is a yearly archive
echo themeblvd_get_local( 'archive' ).': ';
the_time('Y');
} else if ( is_author()) {
// If this is an author archive
global $author;
$userdata = get_userdata($author);
echo themeblvd_get_local('crumb_author').' '.esc_html($userdata->display_name);
}
}
Add "Archive Banner" feature. Conceptually similar to #328.
Reference: http://dev.themeblvd.com/tutorial/full-width-and-parallax-banners-for-archives/
For reference, here was the original themeblvd_archive_title() function we can use as a starting point: