make header click for homepage
-
I’m using the theme Sela and want to make my header image clickable so that it will bring the user back to the homepage.
The header.php reads like this:
<head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link rel=”profile” href=”http://gmpg.org/xfn/11″>
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>
<?php wp_head(); ?>
</head><body <?php body_class(); ?>>
<div id=”page” class=”hfeed site”>
<header id=”masthead” class=”site-header” role=”banner”>
“><?php _e( ‘Skip to content’, ‘sela’ ); ?><div class=”site-branding”>
<?php sela_the_site_logo(); ?>
<h1 class=”site-title”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
<?php
$description = get_bloginfo( ‘description’, ‘display’ );
if ( $description || is_customize_preview() ) : ?>
<h2 class=”site-description”><?php echo $description; /* WPCS: xss ok. */ ?></h2>
<?php
endif; ?>
</div><!– .site-branding –><nav id=”site-navigation” class=”main-navigation” role=”navigation”>
<button class=”menu-toggle” aria-controls=”menu” aria-expanded=”false”><?php _e( ‘Menu’, ‘sela’ ); ?></button>
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>
<!– #site-navigation –>
<!– #masthead –><div id=”content” class=”site-content”>
What can I add to make the image become a link to the main page?
-
Hi @sydneytherese,
If you are able to access your PHP then chances are your site is a self-hosted WordPress.ORG site.
If your site is a self-hosted site, you can post your question on the WordPress.ORG support forum. This is a public forum which provides support only for the sites hosted on WordPress.com
You can seek help for WordPress.org sites here:
https://wordpress.org/support/Also – please know that you might need an account to post on self-hosted WordPress forums. You can create one here:
https://login.wordpress.org/registerYou can read the difference between WordPress.com and WordPress.org here:
https://en.support.wordpress.com/com-vs-org/Thank you!
-
sydneytherese – please feel free to post in the Sela forum and we’ll get to your question there:
https://wordpress.org/support/theme/sela
Thanks in advance for your patience while we work through a holiday backlog of questions.
allykmyta – thanks for helping here! Please try to point folks to the specific WordPress.org forum for their theme, otherwise the theme author (in this case, Automattic/WordPress.com) isn’t likely to spot their question over there.
-
- The topic ‘make header click for homepage’ is closed to new replies.