-
Notifications
You must be signed in to change notification settings - Fork 39
Clickable header in rtPanel child theme
We do come across some Wordpress sites that don't have logos but have the header image banners instead. And some popular themes like Twenty Eleven provides an option only for the header image, while there is no separate option for uploading the logo from the back-end. In such cases, like in Twenty Eleven themes, the header image and logo are the same and hence are clickable by default.
But what if users want the different options for both header and logo? Considering that we have provided options for the header image and logo separately in rtPanel Theme Framwork. That is, if we upload the logo, its clickable, but if we upload the header image, its not clickable.
If we need the header image banner instead of the logo, just put the following code into your child theme's header.php file, under the
section.$header_image = get_header_image();
This $header_image variable now outputs the Header Image URL when echoed. So, echo this image using tag within the tag, linking to the homepage.
echo '<a href="'.esc_url( home_url( '/' ) ).'"><img src="'.$header_image.'" alt=""/></a>';
Once done successfully, the header image now appears clickable, redirecting to the homepage on clicking.
rtPanel:
- End-User Documentation
- Developer Documentation
- General
- Customizing Image Sliders in rtPanel Child Theme
- Add Google ad-banner above logo in rtPanel
- Customize rtPanel Footer Information
- Filters in rtPanel
- Integrated SEO plugin in rtPanel
- Create Metabox on rtPanel Child Theme
- Add Google Adsense Link Unit In Header
- Create Custom Taxonomy on rtPanel
- rtPanel:Comments with Gravatar
- rtPanel: Subscribe Widget
- Create Custom Post Type with rtPanel Child Theme
- rtPanel Theme Options ‘General’
- Using rtp_generate_thumbs() function in child theme
- WordPress Debugger 'WP_DEBUG'
- Adding Social Sharing Button to Website: Using Text Widget
- Clickable header in rtPanel child theme
- CSS Checklist for developers
- Implementing rtp-slider in the child theme
- Creating custom page templates in rtPanel child theme
- Child Theme development using rtPanel – Part I
- Child Theme development using rtPanel – Part 2
- rtPanel Developer Program: Standards Guidelines
- rtPanel Developer Program:Test Project
- Removing the default rtPanel Hooks
- Browser Specific Styling