Right now my logo in the header point at the frontpage. It’s fine at some landing pages but when the users are behind the login-wall I would prefer the logo in header link point at another URL than my front page.
Is this possible and if it is: What do I need to do?
]]>How do I change the Gridbox theme’s logo header to link to a different URL other than the blog’s top page?
More detail: I installed WordPress with the Gridbox theme into this directory folder: https://matrixpremier.com/seo-blog. WordPress will be just a portion of the entire website on this domain: https://matrixpremier.com/. So I do NOT want the “Matrix Premier” header logo on the blog pages to link to the top BLOG PAGE (https://matrixpremier.com/seo-blog), I want them to link to the top of the ENTIRE WEBSITE: (https://matrixpremier.com/).
Thanks much!
]]>I have had a look in the codex, and at multiple queries in the forum addressing the same issue, however am struggling to make sense of it as my header code is very different from the ones used in the examples (very new to wp).
My code now looks like this (got it from a youtube tutorial, to allow for header image change in the wp login):
<img src=”<?php header_image(); ?>”height=”<?php echo get_custom_header()->height; ?>”width=”<?php echo get_custom_header()->width; ?>”alt=”” />
Any comment on how to make the header a link with this in mind would be much appreciated!
Thanks.
]]>Here is my header.php code I am working with.
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
* and the left sidebar conditional
*
* @since 3.0.0
*/
?><!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" <?php language_attributes(); ?>><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" <?php language_attributes(); ?>><!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="https://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if IE]><script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="grid<?php echo ' ' . mb_theme_options( 'width' ); ?>">
<header id="header" class="row" role="banner">
<div class="c12">
<div id="mobile-menu">
<a href="#" class="left-menu"><i class="icon-reorder"></i></a>
<a href="#"><i class="icon-search"></i></a>
</div>
<div id="drop-down-search"><?php get_search_form(); ?></div>
<?php
$logo = mb_theme_options( 'logo' );
$text_color = get_header_textcolor();
$alignment = mb_theme_options( 'header_alignment' );
$header_class = ( $alignment ) ? $alignment : '';
$header_class2 = ( ! $logo && 'blank' == $text_color ) ? 'remove' : $header_class;
$class = ( $logo ) ? ' class="remove"' : '';
?>
<div class="title-logo-wrapper <?php echo $header_class2; ?>">
<?php
if ( $logo ) {
?>
<a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" id="site-logo" rel="home"><img src="<?php echo $logo; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
<?php } ?>
<div class="header-group">
<h1 id="site-title"<?php echo $class; ?>><a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php if ( mb_theme_options( 'tagline' ) ) { ?><h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><?php } ?>
</div>
</div>
<?php
if ( is_active_sidebar( 'header-area' ) ) { ?>
<div id="header-widgets" class="<?php echo $header_class; ?>">
<?php dynamic_sidebar( 'header-area' ); ?>
</div>
<?php
}
$header_image = get_header_image();
if ( $header_image ) {
?>
<a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img id="header-img" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php
}
?>
<nav id="site-navigation" role="navigation">
<h3 class="assistive-text"><?php _e( 'Main menu', 'magazine-basic' ); ?></h3>
<a class="assistive-text" href="#primary" title="<?php esc_attr_e( 'Skip to content', 'magazine-basic' ); ?>"><?php _e( 'Skip to content', 'magazine-basic' ); ?></a>
<?php echo str_replace( '</li>', '', wp_nav_menu( array( 'theme_location' => 'primary', 'echo' => false ) ) ); ?>
</nav><!-- #site-navigation -->
<nav id="site-sub-navigation" role="navigation">
<h3 class="assistive-text"><?php _e( 'Sub menu', 'magazine-basic' ); ?></h3>
<?php echo str_replace( '</li>', '', wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'secondary-menu', 'echo' => false, 'fallback_cb' => false ) ) ); ?>
</nav><!-- #site-sub-navigation -->
</div><!-- .c12 -->
</header><!-- #header.row -->
<div id="main" class="row">
<div id="left-nav"></div>
<?php
/* Do not display sidebars if full width option selected on single
post/page templates */
if ( 5 == mb_theme_options( 'layout' ) )
get_sidebar();
I have already tried changing `<?php
if ( $logo ) {
?>
<a href=”<?php echo esc_url( home_url() ); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” id=”site-logo” rel=”home”><img src=”<?php echo $logo; ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” /></a>
<?php } ?>
<div class=”header-group”>
<h1 id=”site-title”<?php echo $class; ?>><a href=”<?php echo esc_url( home_url() ); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></a></h1>`
When changing it I used <a href="https://www.urliwant.com">
to replace <a href="<?php echo esc_url( home_url() ); ?>"
and <a href="<?php echo esc_url( home_url() ); ?>"
that appears under the logo part and I have not gotten it to change at all.
Thanks for the help.
https://www.ads-software.com/plugins/unique-headers/
]]>i changed my logo graphic on my blog header. additionally i changed the name of the blog/link to “journal”. the url on the static page reflects that. it was www.shanaphotography.com/blog and now is www.shanaphotography.com/journal
however, when on an earlier entry on the journal(blog) i need to be able to click the header image to bring one back to the static journal (blog)page.
can’t figure out where/how to change the link?
thank you for any input!
]]>I’m getting a link to href=”https://domain/index.php/somepage” on the h2 .entry-title at the top, while for the date and image the links are href=”https://domain/postid” on the div .entry-meta span .posted-on
The second link is correct.
Currently I am using jQuery to remove the link, but it would be better if it had the right link.
https://www.ads-software.com/plugins/so-widgets-bundle/
]]>I’ve been working on my first website ever, I LOVE WP… but one issue, how do I the header image link to the index page?
Came across this but I’m not a programmer so I couldn’t figure out how to make it to use (where to place the code exactly without messing something up)…
this is the code:
<?php
/**
* Theme Header Section for our theme.
*
* Displays all of the <head> section and everything up till <div id="main" class="clearfix"> <div class="inner-wrap">
*
* @package ThemeGrill
* @subpackage Accelerate
* @since Accelerate 1.0
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/**
* This hook is important for wordpress plugins and other many things
*/
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<?php do_action( 'accelerate_before' ); ?>
<div id="page" class="hfeed site">
<?php do_action( 'accelerate_before_header' ); ?>
<header id="masthead" class="site-header clearfix">
<div id="header-text-nav-container" class="clearfix">
<?php if( accelerate_options( 'accelerate_header_image_position', 'position_two' ) == 'position_one' ) { accelerate_render_header_image(); } ?>
<div class="inner-wrap">
<div id="header-text-nav-wrap" class="clearfix">
<div id="header-left-section">
<?php
if( ( accelerate_options( 'accelerate_show_header_logo_text', 'text_only' ) == 'both' || accelerate_options( 'accelerate_show_header_logo_text', 'text_only' ) == 'logo_only' ) && accelerate_options( 'accelerate_header_logo_image', '' ) != '' ) {
?>
<div id="header-logo-image">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo accelerate_options( 'accelerate_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
</div><!-- #header-logo-image -->
<?php
}
$screen_reader = '';
if ( ( accelerate_options( 'accelerate_show_header_logo_text', 'text_only' ) == 'logo_only' || accelerate_options( 'accelerate_show_header_logo_text', 'text_only' ) == 'none' ) ) {
$screen_reader = 'screen-reader-text';
}
?>
<div id="header-text" class="<?php echo $screen_reader; ?>">
<?php
if ( is_front_page() || is_home() ) : ?>
<h1 id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</h1>
<?php else : ?>
<h3 id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</h3>
<?php endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p id="site-description"><?php echo $description; ?></p>
<?php endif;
?>
</div><!-- #header-text -->
</div><!-- #header-left-section -->
<div id="header-right-section">
<?php
if( is_active_sidebar( 'accelerate_header_sidebar' ) ) {
?>
<div id="header-right-sidebar" class="clearfix">
<?php
// Calling the header sidebar if it exists.
if ( !dynamic_sidebar( 'accelerate_header_sidebar' ) ):
endif;
?>
</div>
<?php
}
?>
</div><!-- #header-right-section -->
</div><!-- #header-text-nav-wrap -->
</div><!-- .inner-wrap -->
<?php if( accelerate_options( 'accelerate_header_image_position', 'position_two' ) == 'position_two' ) { accelerate_render_header_image(); } ?>
<nav id="site-navigation" class="main-navigation inner-wrap clearfix" role="navigation">
<h3 class="menu-toggle"><?php _e( 'Menu', 'accelerate' ); ?></h3>
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array( 'theme_location' => 'primary' ) );
}
else {
wp_page_menu();
}
?>
</nav>
</div><!-- #header-text-nav-container -->
<?php if( accelerate_options( 'accelerate_header_image_position', 'position_two' ) == 'position_three' ) { accelerate_render_header_image(); } ?>
<?php
if( accelerate_options( 'accelerate_activate_slider', '0' ) == '1' ) {
if ( is_front_page() ) {
accelerate_featured_image_slider();
}
}
?>
</header>
<?php do_action( 'accelerate_after_header' ); ?>
<?php do_action( 'accelerate_before_main' ); ?>
<div id="main" class="clearfix">
<div class="inner-wrap clearfix">
THANKS to anyone who can help
Avi
About the problem:
I uploaded the header Image, but it doesn’t link to the “/”.
If I take the image away, then H1 link funktion exists, but without H1 can’t link my Homepage from the header image.
My site: Selbstverteidigung
Thanks for your help!
]]>