Site logo

Archived topic

Page header link

6 replies · Started by Amanda Martin on August 18, 2014

Viewing posts 1–7 of 7

Hi,

I purchased your Super pack, including the page header add-on. I have added an image to the page with success but I was wondering if there was a way to link that image to another page on my site?

Cheers,
Amanda

Hi Amanda,

Totally a needed feature - I've marked it down as a future feature in the next version.

For now, you can use the Content tab and do something like this:

<a href="YOUR URL"><img src="THE URL TO YOUR IMAGE" alt="" /></a>

That would be great. I tried your short cut and my image is now linked but it no longer goes to the edge of the content area as seen here. http://www.vancouverhomeexchange.ca Any thoughts?

Your best bet would be to wrap it in a div like this:

<div style="margin:-40px -40px 40px -40px;"><a href="YOUR URL"><img src="THE URL TO YOUR IMAGE" alt="" /></a></div>

The upcoming version of Page Header has an option field for a link :)

Hi Tom

I followed the discussions about adding links to headers in the Generate Press theme all over the web... and I am still not able to do it, grrrr.

Well, I really would like to link the whole image/area of the header to an url, not only the Logo.

You say above that the upcoming version of Page Header has an option field for a link
I use the latest Version: 1.3.28 but I could not find any option there...

So I tried to add the code, but I do not find out where to put which code.

Thats what I have already done:

I produced a child theme
I copied the header.php to the child theme

And now?

Please help, I am keen on learning ;-)
Maren

P.S.:
The header.php looks like this

<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <main id="main">
*
* @package GeneratePress
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>

<body <?php generate_body_schema();?> <?php body_class(); ?>>
<?php do_action( 'generate_before_header' ); ?>
"><?php _e( 'Skip to content', 'generatepress' ); ?>
<header itemtype="http://schema.org/WPHeader" itemscope="itemscope" id="masthead" <?php generate_header_class(); ?>>

>
<?php do_action( 'generate_before_header_content'); ?>
<?php generate_header_items(); ?>
<?php do_action( 'generate_after_header_content'); ?>

<!-- .inside-header -->
</header><!-- #masthead -->
<?php do_action( 'generate_after_header' ); ?>

<?php do_action('generate_inside_container'); ?>

Hi there,

1.3.28 is the free theme - you want to look at your GP Premium/individual add-on version.

You're wanting to link your entire area, including all content? Not just the image?

This archived topic is closed to new replies.