• Resolved fuzzy486

    (@fuzzy486)


    I’ve looked through the forum and tried every suggestion, but nothing will change the link of my header image from the default home page. Instead of mysite.com I want mysite.com/otherpage as the page you go to when clicking the header. Help appreciated!

    Here is my Mystique header.php file

    <?php /* Mystique/digitalnature */ ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php //language_attributes('xhtml'); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php mystique_title(); ?></title>
    
    <?php mystique_meta_description(); ?>
    <meta name="designer" content="digitalnature.ro" />
    
    <?php if(WP_VERSION < 3.0): ?>
    <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'); ?>" />
    <?php endif; ?>
    
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
    
    <?php wp_head(); ?>
    </head>
    
    <body class="<?php mystique_body_class() ?>">
     <div id="page">
    
      <div class="page-content header-wrapper">
    
    	<div id="header" class="bubbleTrigger" >
    
          <?php do_action('mystique_header_start'); ?>          
    
          <div id="site-title" class="clear-block">
    
            <?php mystique_logo(); ?>
            <?php if(get_bloginfo('description')): ?><p class="headline"><?php bloginfo('description'); ?></p><?php endif; ?>
    
            <?php do_action('mystique_header'); ?>
    
          </div>
    
          <?php mystique_navigation(); ?>
    
          <?php do_action('mystique_header_end'); ?>      
    
        </div>
    
      </div>
    
      <!-- left+right bottom shadow -->
      <div class="shadow-left page-content main-wrapper">
       <div class="shadow-right">
    
         <?php do_action('mystique_before_main'); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Looks like the actual logo is controlled by the mystique_logo(); function. Could you post the code for that function?

    Also, this looks like a theme where you’re not supposed to edit directly. You should probably make these edits in a child theme. But can’t give much help until I see the contents of the mystique_logo(); function.

    Thread Starter fuzzy486

    (@fuzzy486)

    Thanks, here is the function.

    function mystique_logo(){
      $options = get_option('mystique');
      $size = $options['logo_size'];
      if($size) $size = 'width="'.substr($size, 0, strpos($size, "x")).'" height="'.substr($size, strpos($size, 'x')+1).'"';
    
      $sitename = get_bloginfo('name');
      $siteurl = get_bloginfo('url');
    
      $tag = (is_home() || is_front_page()) ? 'h1' : 'div';
    
      $output = '<'.$tag.' id="logo">';
    
      if($options['logo']) // logo image?
        $output .= '<a href="'.$siteurl.'"><img src="'.$options['logo'].'" title="'.$sitename.'" '.$size.' alt="'.$sitename.'" /></a>';
      else
        $output .= '<a href="'.$siteurl.'">'.$sitename.'</a>';
      $output .= '</'.$tag.'>';
      echo apply_filters('mystique_logo', $output);
    }

    Ah, I see the issue. This part of the code:

    $siteurl = get_bloginfo('url');

    is fetching your homepage URL and making the logo link to the home page.

    I think you might be able to modify this filter. Try using this code (add it to functions.php):

    function new_logo_url($output) {
    	$options = get_option('mystique');
     $output = '<'.$tag.' id="logo">';
    
      if($options['logo']) // logo image?
        $output .= '<a href="PUT NEW URL HERE"><img src="'.$options['logo'].'" title="'.$sitename.'" '.$size.' alt="'.$sitename.'" /></a>';
      else
        $output .= '<a href="PUT NEW URL HERE">'.$sitename.'</a>';
      $output .= '</'.$tag.'>';
    }
    add_filter('mystique_logo', 'new_logo_url');

    Not sure if it’ll work but try it and see…

    Thread Starter fuzzy486

    (@fuzzy486)

    Thank you!

    Adding that code did not work. Based on that idea, directly in the mystique_logo(); function, I replaced <a href="'.$siteurl.'"> with <a href="NEW URL"> and that worked.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Clickable header in Mystique theme’ is closed to new replies.