Need to link website logo to external url from backend interface in drupal 7.
Now I hard coded it to my page.tpl.php file.
Is there any option to add it from backend?
There are no default option for linking website logo to the external URL.
We need to create a field in the back end for theme settings.
Create a page theme-settings.php just inside theme folder with the following code
function theme_form_system_theme_settings_alter(&$form, $form_state) {
$form['theme_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Theme settings')
);
$form['theme_settings']['theme_logourl'] = array(
'#type' => 'textfield',
'#title' => t('Logo url'),
'#default_value' => theme_get_setting('theme_logourl'),
'#description' => t("Logo url for external linking"),
);
return $form;
}
Go and check to the theme settings page - appearance/settings/theme
There will be a new text filed to enter the external url