• Resolved bertarecchia

    (@bertarecchia)


    Hi. I’m using LightWord template.
    I’ve found a bunch of posts telling how to change the link associated with the Home button in the top header. I need the top button not to go to the blog but to my web site. E.G:

    “In header.php, look for lines with
    <?php bloginfo(‘name’); ?> and
    <?php bloginfo(‘description’); ?>
    You can change the href to whatever location you want.”

    Or

    “It’s the code usually AFTER the <body> tag, with something like wp_list_pages or wp_list_categories …”

    There are no href or anything that tells a newbie like me that there’s a url. I’m attaching the code I think has the important parts naybe some1 can direct me a bit.

    From header.php:

    </head>
    
    <body>
    <div id="wrapper">
    <?php lw_header_image(); ?>
    <div id="header">
    <?php lw_rss_feed(); ?>
    <div id="top_bar">
    <ul id="front_menu"<?php echo lw_expmenu(); ?>>
    <?php echo lw_homebtn(__('Home','lightword')); ?>
    <?php echo lw_wp_list_pages();  ?>
    </ul>
    <?php echo lw_searchbox(); ?>
    </div>
    
    </div>
    <div id="content">

    From functions.php:

    // HOME BUTTON
    
    function lw_homebtn($homebtn_value){
    global $lw_remove_homebtn; if($lw_remove_homebtn == "false") { if(is_front_page()) $selected="s"; ?><li><a class="<?php echo $selected; ?>" title="<?php echo $homebtn_value; ?>" href="<?php bloginfo('url'); ?>"><span><?php echo $homebtn_value ?></span></a></li>
    <?php
    }
    }

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter bertarecchia

    (@bertarecchia)

    Ugh…amazing. I spent hours finding the answer and as soon as I posted this a strike of genus hit me ??

    In functions.php Under HOME BUTTON:

    function lw_homebtn($homebtn_value){
    global $lw_remove_homebtn; if($lw_remove_homebtn == "false") { if(is_front_page()) $selected="s"; ?><li><a class="<?php echo $selected; ?>" title="<?php echo $homebtn_value; ?>" href="https://www.YOURADDRESS.com"><span><?php echo $homebtn_value ?></span></a></li>
    <?php
    }
    }

    Under Header.php I also changed the text in the button from Home to Visit our Store:

    <ul id="front_menu"<?php echo lw_expmenu(); ?>>
    <?php echo lw_homebtn(__('Visit Our Store','lightword')); ?>
    <?php echo lw_wp_list_pages();  ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Not so simple to change the Home Button Link.’ is closed to new replies.