• Hi all,

    I have read the codex link and am feeling like an idiot for not figuring out how to change the header code to make my image clickable. The site is
    https://weebleswobblog.com – temporarily housed at https://69.89.31.226/~weeblesw

    and the current code is:

    <?php
    /**
     * @package WordPress
     * @subpackage Djupvik_theme
     */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    	<head profile="https://gmpg.org/xfn/11"><a href="https://weebleswobblog.com/">
    		<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    		<style type="text/css" media="screen">
    			@import url( <?php bloginfo('stylesheet_url'); ?> );
    		</style>
    		<title><?php djk_doctitle() ?></title>
    		<meta name="robots" content="index,follow" />
    <link rel="shortcut icon" href="favicon.ico">
    		<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    		<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
    		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    		<?php wp_head(); ?>
    	</head></a>
    	<body>
    		<div id="wrapper" class="container_16">
    			<div class="top-960"></div>
    			<a href=<div id="header-container" class="grid_16">
    				<div id="blog-title" class="prefix_2">
    					<h2><a title="<?php bloginfo('name') ?>" href="<?php bloginfo('home') ?>"><?php bloginfo('name') ?></a></h2>
    				</div><!-- #blog-title -->
    				<div id="blog-description" class="prefix_2">
    					<?php djk_blog_description() ?>
    				</div><!-- #blog-description -->
    				<div id="menu">
    					<ul>
    						<?php wp_list_pages('title_li=&depth=1&exclude=1588') ?>
    					</ul>
    				</div><!-- #menu -->
    			</div><!-- #header-container -->

    Thanks so much for helping me out…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Your header is a background image so the only way to make it a link is to create a link on the div container level

    <div onclick=”location.href=’https://www.example.com&#8217;;” style=”cursor:pointer;”></div>

    So this should work

    <div id=”header-container” class=”grid_16″ onclick=”location.href=’https://weebleswobblog.com ‘;” style=”cursor:pointer;”>

    Hi,

    To make the header clickable we need to modify header.php file of current active wordpress theme. YOu can find the code which needs to modified at here:

    Thanks,

    Shane G.

    Thread Starter ljauss

    (@ljauss)

    PBP_Editor –

    Should I replace some code with what you put in? Just pasting it in seemed to do wonky things to the page.

    Thanks!

    Shane –

    I’ve seen that code, but not sure exactly what I would type and where on this particular header.

    Thanks!

    Thread Starter ljauss

    (@ljauss)

    Never mind! I figured it out and got it. Thank you SO very much for the help – big thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Clickable header’ is closed to new replies.