Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header (http://forum.bytesforall.com/forumdisplay.php?f=43)
-   -   How to make the Logo link to another URL (http://forum.bytesforall.com/showthread.php?t=13445)

juggledad Mar 23, 2011 08:11 AM

How to make the Logo link to another URL
 
By default, the logo image links to the URL of your site as defined at Dashboard->Setting->General->Site address (URL).

If you want it to point at some other URL, you have two choices:
1) edit the theme code and hard code in the new URL
2) instead of using '%logo' in ATO->Style & edit HEADER AREA->Configure Header Area, create a new widget area and put the logo html in it

If you want to do option (1) remember that you will have to redo it every time you update the theme and the line numbers may change over time.

edit bfa-header-config.php and find the section that starts with
HTML Code:

                                // Logo Icon for Wordpress and WPMU

which is line 153 in version 3.6.4 - now change the lines
HTML Code:

                                echo '<td ' . $header_rowspan . 'valign="middle" class="logoarea-logo"><a href="'
                                . $homeURL . '/"
>
<img class="logo" src="';

to
HTML Code:

                                echo '<td ' . $header_rowspan . 'valign="middle" class="logoarea-logo"><a href="'
                                . 'http://the-new-url.com' . '/"
>
<img class="logo" src="';

and now your logo image will link to the new uUL.

If you want to do option (2)
a)create a new widget area in ATO->Style & edit HEADER AREA->Configure Header Area by adding the following:
HTML Code:

<?php bfa_widget_area('name=Logo-widget-area'); ?>
in place of the '%logo' option
b) go visit the site (this will create the new widget area)
c) go to Dashboard->Appearances->Widgets and you will see a new widget area called 'Logo-widget-area'
d) add a text widget to that area.
e) add the following to the text widget
HTML Code:

<table id="logoarea" cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
                <td rowspan="2" valign="middle" class="logoarea-logo">
                        <a href="http://yourdomain.com/">
                                <img class="logo" src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" />
                        </a>
                </td>
                <td rowspan="2" valign="middle" class="logoarea-title">
                        <h1 class="blogtitle">
                                <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
                        </h1>
                        <p class="tagline"><?php bloginfo('description'); ?></p>
                </td>
<!-- ============================ -->
<!-- = START of feed icons code = -->
<!-- ============================ -->
                <td class="feed-icons" valign="middle" align="right">
                        <div class="clearfix rss-box">
                                <a class="comments-icon" href="<?php bloginfo('url'); ?>/?feed=comments-rss2" title="Subscribe to the COMMENTS feed">Comments</a>
                                <a class="posts-icon" href="<?php bloginfo('url'); ?>/?feed=rss2" title="Subscribe to the POSTS feed">Posts</a>
                        </div>
                </td>
        </tr>
<!-- ========================== -->
<!-- = END of feed icons code = -->
<!-- ========================== -->

<!-- ========================== -->
<!-- = START of search box code -->
<!-- ========================== -->
<tr>
                <td valign="bottom" class="search-box" align="right">
                        <div class="searchbox">
                                <form method="get" class="searchform" action="<?php bloginfo('url'); ?>">
                                        <div class="searchbox-form">
                                                <input type="text" class="text inputblur" onfocus="this.value=''"        value="" onblur="this.value=''" name="s" />
                                        </div>
                                </form>
                        </div>
                </td>
        </tr>
<!-- ========================== -->
<!-- = END of search box code = -->
<!-- ========================== -->
</table>

making sure to change the fourth line from
HTML Code:

                        <a href="http://yourdomain.com/">
to the new URL.
f) install and activate the plugin 'exec-php'
and you should now have a logo image that points to the URL you want.


All times are GMT -6. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.