Status
Not open for further replies.

xfactormaster

Active Member
202
2011
18
270
Site logo/header is not hypertexed to home page.

Capture.jpg


Its is just a text.
If I mouse hover there, it should appear the link home page(MasalaPage.com) to open it.
Any help?
 
7 comments
That text is part of the image so:

Replace this:
Code:
<img src="[URL="http://www.wjunction.com/view-source:http://masalapage.com/wp-content/themes/graphene/images/headers/flow.jpg"]http://masalapage.com/wp-content/themes/graphene/images/headers/flow.jpg[/URL]" alt="" width="960" height="285" class="header-img" />

With this (edit as needed):
Code:
[B]<a [I]href=[/I]"/" [I]title=[/I]"you title here">[/B][B]<img [I]alt=[/I]"Logo" [I]src=[/I]"your image source here">[/B][B]</a>[/B]

As far as I know this should work however the code was pulled from a site I am setting up at the moment so please make a backup of your current code before making the changes just in case.

JGM.
 
yes background is image but that site name & description generated by Wordpress

open header.php
and edit line number 82:

replace what ever there with this below code
Code:
<h1 class="header_title push_1 grid_15"><a href="<?php  echo home_url(); ?>"><?php bloginfo( 'name' );  ?></a></h1>
 
That text is part of the image so:

Replace this:
Code:
<img src="[URL="http://www.wjunction.com/view-source:http://masalapage.com/wp-content/themes/graphene/images/headers/flow.jpg"]http://masalapage.com/wp-content/themes/graphene/images/headers/flow.jpg[/URL]" alt="" width="960" height="285" class="header-img" />

With this (edit as needed):
Code:
[B]<a [I]href=[/I]"/" [I]title=[/I]"you title here">[/B][B]<img [I]alt=[/I]"Logo" [I]src=[/I]"your image source here">[/B][B]</a>[/B]

As far as I know this should work however the code was pulled from a site I am setting up at the moment so please make a backup of your current code before making the changes just in case.

JGM.

I am not getting your point, please tell me what file to edit?
 
yes background is image but that site name & description generated by Wordpress

open header.php
and edit line number 82:

replace what ever there with this below code
Code:
<h1 class="header_title push_1 grid_15"><a rel="nofollow" href="<?php  echo home_url(); ?>"><?php bloginfo( 'name' );  ?></a></h1>

Not Working.
ERROR: Parse error: syntax error, unexpected '<' in /home/masala/public_html/wp-content/themes/graphene/header.php on line 82

Here is the header.php code

PHP:
<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content-main">
 *
 * @package Graphene
 * @since graphene 1.0
 */
global $graphene_settings;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title><?php wp_title( '' ); ?></title>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<?php if ( !get_theme_mod( 'background_image', false) && !get_theme_mod( 'background_color', false) ) : ?>
<div class="bg-gradient">
<?php endif; ?>

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

<div id="container" class="container_16">
    
    <?php if ( $graphene_settings['hide_top_bar'] != true) : ?>
        <div id="top-bar">
                <?php do_action( 'graphene_before_feed_icon' ); ?>
                <div id="profiles" class="clearfix gutter-left">
                    <?php do_action( 'graphene_social_profiles' ); ?>
                </div>
            <?php
            /**
             * Retrieves our custom search form.
             */
            ?>
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'top_bar' || $search_box_location == '' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_top_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_top_bar' ); ?>
            
        </div>
    <?php endif; ?>

    <?php
        global $post;
        $post_id = ( $post ) ? $post->ID : false;
        $header_img = graphene_get_header_image( $post_id );
        $alt = graphene_get_header_image_alt( $header_img );

        /* Check if the page uses SSL and change HTTP to HTTPS if true */
        if ( is_ssl() && stripos( $header_img, 'https' ) === false ) {
            $header_img = str_replace( 'http', 'https', $header_img );
        }
    ?>
    <div id="header">
        
        <?php 
            $header_img = '<img src="' . $header_img . '" alt="' . $alt . '" width="' . HEADER_IMAGE_WIDTH . '" height="' . HEADER_IMAGE_HEIGHT . '" class="header-img" />';
            if ( ! is_front_page() && $graphene_settings['link_header_img'] ) {
                $header_img_tag = '<a href="' . apply_filters( 'graphene_header_link' , home_url() ) . '" id="header_img_link" title="' . esc_attr__( 'Go back to the front page', 'graphene' ) . '">';
                $header_img_tag .= $header_img;
                $header_img_tag .= '</a>';
                
                $header_img = $header_img_tag;
            }
            echo $header_img;
        ?>
                   
        <?php /* Header widget area */
        if ( $graphene_settings['enable_header_widget'] && is_active_sidebar( 'header-widget-area' ) ) {
            echo '<div class="header-widget">';
            dynamic_sidebar( 'header-widget-area' );
            echo '</div>';
        }
        ?>
        
        <?php /* The site title and description */ 
        if ( ! in_array( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ), array( 'blank', '' ) ) ) :
            if ( is_front_page() || is_home() ) { 
                $title_tag = 'h1';
                $desc_tag = 'h2';
            } else {
                $title_tag = 'h2';
                $desc_tag = 'h3';
            }
            ?>
            <?php echo "<$title_tag class=\"header_title push_1 grid_15\">"; ?>
                <?php if ( ! is_front_page() ) : ?><a href="<?php echo apply_filters( 'graphene_header_link' , home_url() ); ?>" title="<?php esc_attr_e( 'Go back to the front page', 'graphene' ); ?>"><?php endif; ?>
                    <?php bloginfo( 'name' ); ?>
                <?php if ( ! is_front_page() ) : ?></a><?php endif; ?>
            <?php echo "</$title_tag>"; ?>
            
            <?php echo "<$desc_tag class=\"header_desc push_1 grid_15\">"; ?>
                <?php bloginfo( 'description' ); ?>
            <?php echo "</$desc_tag>"; ?>
        <?php endif; ?>
        
        <?php do_action( 'graphene_header' ); ?>
    </div>
    <div id="nav">
        <?php /* The navigation menu */ ?>
        <div id="header-menu-wrap" class="clearfix">
            <?php
            /* Header menu */
            $args = array(
                'container' => '',
                'menu_id' => 'header-menu',
                'menu_class' => graphene_get_menu_class( 'menu clearfix' ),
                'fallback_cb' => 'graphene_default_menu',
                'depth' => 5,
                'theme_location' => 'Header Menu',
            );
            if ( ! $graphene_settings['disable_menu_desc'] )
                $args = array_merge( $args, array( 'walker' => new Graphene_Description_Walker() ) );
                
            wp_nav_menu( apply_filters( 'graphene_header_menu_args', $args ) ); ?>
            
            <div class="clear"></div>
            
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'nav_bar' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_nav_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_header_menu' ); ?>
        
        </div>
        
        <?php
        /* Secondary menu */
        $args = array(
            'container' => 'div',
            'container_id' => 'secondary-menu-wrap',
            'container_class' => 'clearfix',
            'menu_id' => 'secondary-menu',
            'menu_class' => 'menu clearfix',
            'fallback_cb' => 'none',
            'depth' => 5,
            'theme_location' => 'secondary-menu',
        );
        wp_nav_menu( apply_filters( 'graphene_secondary_menu_args', $args ) );
        ?>
        
        <div class="menu-bottom-shadow">&nbsp;</div>


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

    </div>

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

    <div id="content" class="clearfix hfeed">
        <?php do_action( 'graphene_before_content-main' ); ?>
        
        <?php
        
            /* Sidebar2 on the left side? */
            if ( in_array( graphene_column_mode(), array( 'three_col_right', 'three_col_center', 'two_col_right' ) ) ){
                get_sidebar( 'two' );
            }
            
            /* Sidebar1 on the left side? */            
            if ( in_array( graphene_column_mode(), array( 'three_col_right' ) ) ){
                get_sidebar();                
            }
        
        ?>
        
        <div id="content-main" <?php graphene_grid( 'clearfix', 16, 11, 8 ); ?>>
        <?php do_action( 'graphene_top_content' ); ?>

please tell what to edit here?
 
Last edited:
ok
add this
header.php
Code:
 <?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content-main">
 *
 * @package Graphene
 * @since graphene 1.0
 */
global $graphene_settings;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title><?php wp_title( '' ); ?></title>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<?php if ( !get_theme_mod( 'background_image', false) && !get_theme_mod( 'background_color', false) ) : ?>
<div class="bg-gradient">
<?php endif; ?>

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

<div id="container" class="container_16">
    
    <?php if ( $graphene_settings['hide_top_bar'] != true) : ?>
        <div id="top-bar">
                <?php do_action( 'graphene_before_feed_icon' ); ?>
                <div id="profiles" class="clearfix gutter-left">
                    <?php do_action( 'graphene_social_profiles' ); ?>
                </div>
            <?php
            /**
             * Retrieves our custom search form.
             */
            ?>
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'top_bar' || $search_box_location == '' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_top_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_top_bar' ); ?>
            
        </div>
    <?php endif; ?>

    <?php
        global $post;
        $post_id = ( $post ) ? $post->ID : false;
        $header_img = graphene_get_header_image( $post_id );
        $alt = graphene_get_header_image_alt( $header_img );

        /* Check if the page uses SSL and change HTTP to HTTPS if true */
        if ( is_ssl() && stripos( $header_img, 'https' ) === false ) {
            $header_img = str_replace( 'http', 'https', $header_img );
        }
    ?>
    <div id="header">
        
        <?php 
            $header_img = '<img src="' . $header_img . '" alt="' . $alt . '" width="' . HEADER_IMAGE_WIDTH . '" height="' . HEADER_IMAGE_HEIGHT . '" class="header-img" />';
            if ( ! is_front_page() && $graphene_settings['link_header_img'] ) {
                $header_img_tag = '<a href="' . apply_filters( 'graphene_header_link' , home_url() ) . '" id="header_img_link" title="' . esc_attr__( 'Go back to the front page', 'graphene' ) . '">';
                $header_img_tag .= $header_img;
                $header_img_tag .= '</a>';
                
                $header_img = $header_img_tag;
            }
            echo $header_img;
        ?>
                   
        <?php /* Header widget area */
        if ( $graphene_settings['enable_header_widget'] && is_active_sidebar( 'header-widget-area' ) ) {
            echo '<div class="header-widget">';
            dynamic_sidebar( 'header-widget-area' );
            echo '</div>';
        }
        ?>
        
        <?php /* The site title and description */ 
        if ( ! in_array( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ), array( 'blank', '' ) ) ) :
            if ( is_front_page() || is_home() ) { 
                $title_tag = 'h1';
                $desc_tag = 'h2';
            } else {
                $title_tag = 'h2';
                $desc_tag = 'h3';
            }
            ?>
            <?php echo "<$title_tag class=\"header_title push_1 grid_15\">"; ?>
                <a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
            <?php echo "</$title_tag>"; ?>
            
            <?php echo "<$desc_tag class=\"header_desc push_1 grid_15\">"; ?>
                <?php bloginfo( 'description' ); ?>
            <?php echo "</$desc_tag>"; ?>
        <?php endif; ?>
        
        <?php do_action( 'graphene_header' ); ?>
    </div>
    <div id="nav">
        <?php /* The navigation menu */ ?>
        <div id="header-menu-wrap" class="clearfix">
            <?php
            /* Header menu */
            $args = array(
                'container' => '',
                'menu_id' => 'header-menu',
                'menu_class' => graphene_get_menu_class( 'menu clearfix' ),
                'fallback_cb' => 'graphene_default_menu',
                'depth' => 5,
                'theme_location' => 'Header Menu',
            );
            if ( ! $graphene_settings['disable_menu_desc'] )
                $args = array_merge( $args, array( 'walker' => new Graphene_Description_Walker() ) );
                
            wp_nav_menu( apply_filters( 'graphene_header_menu_args', $args ) ); ?>
            
            <div class="clear"></div>
            
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'nav_bar' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_nav_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_header_menu' ); ?>
        
        </div>
        
        <?php
        /* Secondary menu */
        $args = array(
            'container' => 'div',
            'container_id' => 'secondary-menu-wrap',
            'container_class' => 'clearfix',
            'menu_id' => 'secondary-menu',
            'menu_class' => 'menu clearfix',
            'fallback_cb' => 'none',
            'depth' => 5,
            'theme_location' => 'secondary-menu',
        );
        wp_nav_menu( apply_filters( 'graphene_secondary_menu_args', $args ) );
        ?>
        
        <div class="menu-bottom-shadow">&nbsp;</div>


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

    </div>

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

    <div id="content" class="clearfix hfeed">
        <?php do_action( 'graphene_before_content-main' ); ?>
        
        <?php
        
            /* Sidebar2 on the left side? */
            if ( in_array( graphene_column_mode(), array( 'three_col_right', 'three_col_center', 'two_col_right' ) ) ){
                get_sidebar( 'two' );
            }
            
            /* Sidebar1 on the left side? */            
            if ( in_array( graphene_column_mode(), array( 'three_col_right' ) ) ){
                get_sidebar();                
            }
        
        ?>
        
        <div id="content-main" <?php graphene_grid( 'clearfix', 16, 11, 8 ); ?>>
        <?php do_action( 'graphene_top_content' ); ?>
 
ok
add this
header.php
Code:
 <?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content-main">
 *
 * @package Graphene
 * @since graphene 1.0
 */
global $graphene_settings;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title><?php wp_title( '' ); ?></title>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<?php if ( !get_theme_mod( 'background_image', false) && !get_theme_mod( 'background_color', false) ) : ?>
<div class="bg-gradient">
<?php endif; ?>

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

<div id="container" class="container_16">
    
    <?php if ( $graphene_settings['hide_top_bar'] != true) : ?>
        <div id="top-bar">
                <?php do_action( 'graphene_before_feed_icon' ); ?>
                <div id="profiles" class="clearfix gutter-left">
                    <?php do_action( 'graphene_social_profiles' ); ?>
                </div>
            <?php
            /**
             * Retrieves our custom search form.
             */
            ?>
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'top_bar' || $search_box_location == '' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_top_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_top_bar' ); ?>
            
        </div>
    <?php endif; ?>

    <?php
        global $post;
        $post_id = ( $post ) ? $post->ID : false;
        $header_img = graphene_get_header_image( $post_id );
        $alt = graphene_get_header_image_alt( $header_img );

        /* Check if the page uses SSL and change HTTP to HTTPS if true */
        if ( is_ssl() && stripos( $header_img, 'https' ) === false ) {
            $header_img = str_replace( 'http', 'https', $header_img );
        }
    ?>
    <div id="header">
        
        <?php 
            $header_img = '<img src="' . $header_img . '" alt="' . $alt . '" width="' . HEADER_IMAGE_WIDTH . '" height="' . HEADER_IMAGE_HEIGHT . '" class="header-img" />';
            if ( ! is_front_page() && $graphene_settings['link_header_img'] ) {
                $header_img_tag = '<a href="' . apply_filters( 'graphene_header_link' , home_url() ) . '" id="header_img_link" title="' . esc_attr__( 'Go back to the front page', 'graphene' ) . '">';
                $header_img_tag .= $header_img;
                $header_img_tag .= '</a>';
                
                $header_img = $header_img_tag;
            }
            echo $header_img;
        ?>
                   
        <?php /* Header widget area */
        if ( $graphene_settings['enable_header_widget'] && is_active_sidebar( 'header-widget-area' ) ) {
            echo '<div class="header-widget">';
            dynamic_sidebar( 'header-widget-area' );
            echo '</div>';
        }
        ?>
        
        <?php /* The site title and description */ 
        if ( ! in_array( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ), array( 'blank', '' ) ) ) :
            if ( is_front_page() || is_home() ) { 
                $title_tag = 'h1';
                $desc_tag = 'h2';
            } else {
                $title_tag = 'h2';
                $desc_tag = 'h3';
            }
            ?>
            <?php echo "<$title_tag class=\"header_title push_1 grid_15\">"; ?>
                <a rel="nofollow" href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
            <?php echo "</$title_tag>"; ?>
            
            <?php echo "<$desc_tag class=\"header_desc push_1 grid_15\">"; ?>
                <?php bloginfo( 'description' ); ?>
            <?php echo "</$desc_tag>"; ?>
        <?php endif; ?>
        
        <?php do_action( 'graphene_header' ); ?>
    </div>
    <div id="nav">
        <?php /* The navigation menu */ ?>
        <div id="header-menu-wrap" class="clearfix">
            <?php
            /* Header menu */
            $args = array(
                'container' => '',
                'menu_id' => 'header-menu',
                'menu_class' => graphene_get_menu_class( 'menu clearfix' ),
                'fallback_cb' => 'graphene_default_menu',
                'depth' => 5,
                'theme_location' => 'Header Menu',
            );
            if ( ! $graphene_settings['disable_menu_desc'] )
                $args = array_merge( $args, array( 'walker' => new Graphene_Description_Walker() ) );
                
            wp_nav_menu( apply_filters( 'graphene_header_menu_args', $args ) ); ?>
            
            <div class="clear"></div>
            
            <?php if ( ( $search_box_location = $graphene_settings['search_box_location'] ) && $search_box_location == 'nav_bar' ) : ?>
                <div id="top_search" class="grid_4">
                    <?php get_search_form(); ?>
                    <?php do_action( 'graphene_nav_search' ); ?>
                </div>
            <?php endif; ?>
            
            <?php do_action( 'graphene_header_menu' ); ?>
        
        </div>
        
        <?php
        /* Secondary menu */
        $args = array(
            'container' => 'div',
            'container_id' => 'secondary-menu-wrap',
            'container_class' => 'clearfix',
            'menu_id' => 'secondary-menu',
            'menu_class' => 'menu clearfix',
            'fallback_cb' => 'none',
            'depth' => 5,
            'theme_location' => 'secondary-menu',
        );
        wp_nav_menu( apply_filters( 'graphene_secondary_menu_args', $args ) );
        ?>
        
        <div class="menu-bottom-shadow">&nbsp;</div>


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

    </div>

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

    <div id="content" class="clearfix hfeed">
        <?php do_action( 'graphene_before_content-main' ); ?>
        
        <?php
        
            /* Sidebar2 on the left side? */
            if ( in_array( graphene_column_mode(), array( 'three_col_right', 'three_col_center', 'two_col_right' ) ) ){
                get_sidebar( 'two' );
            }
            
            /* Sidebar1 on the left side? */            
            if ( in_array( graphene_column_mode(), array( 'three_col_right' ) ) ){
                get_sidebar();                
            }
        
        ?>
        
        <div id="content-main" <?php graphene_grid( 'clearfix', 16, 11, 8 ); ?>>
        <?php do_action( 'graphene_top_content' ); ?>

It worked, thank you.
But I have one doubt,
Is there any possibility to hack a site using header.php code?
Because, my site hacked yesterday, so I removed everything, started from scratch.
This fellow hacked me. https://www.facebook.com/antisecMKM
Any suggestion how to stop like hackers in future.
I am using arvixe.com hosting.

Thank you.
 
Welcome

1)Avoid to use plugins, they are totally unsafe,you can use only trusted ones
2)Dont use 'admin' as user id to login in wp ; to use something else than admin,probably you need to use that at the time of installation
3)Go to your profile in dashboard & edit it & change the display name to some thing else than userid of the WP
4)Use very Strong password & try to update it in month/week


And for your question, A hacker cant hack your wordpress site through header.php
its for some other reason
 
Status
Not open for further replies.
Back
Top