ThemeShaper Forums » Thematic

[closed]

Adding links over the header image

(6 posts)
  • Started 3 years ago by nextchallenge
  • Latest reply from nextchallenge
  • This topic is not resolved
  1. Hello

    I had successfully mapped a series of links over my header image but they disappeared, I think, after I upgraded to the latest version of Thematic/Power Blog.

    It appears to have reset my header.php which I edited for this purpose along with the stylesheet.css.

    Unfortunately, I didn't backup between making these changes and upgrading the theme so I've lost the code. And, frustratingly, I can't remember how I did it!

    The code from my stylesheet is:

    #link_holder #home_link {
    display: block;
      width: 540px;
      height: 263px;
    }
    
    #link_holder #button_link {
      display: block;
      width: 200px;
      height: 80px;
      margin-left: 674px;
      margin-top: -121px;
    }

    ...and so forth.

    And, what I've done from memory in my header.php is:

    <div id="link_holder">
      <div id="home_link"><a href="http://thenextchallenge.org/"></a></div>
      <div id="button_link"><a href="http://thenextchallenge.org/services/"></a></div>
    </div>

    I can see the "boxes" I've mapped out when I use Firebug and they show the "a href" links but they don't work as links.

    Any pointers much appreciated!

    Tim.

    www.thenextchallenge.org

    Posted 3 years ago #
  2. Danieliser
    Member

    Try this. You need to create a menu in the wp 3.0 menu area called Top Menu.

    // Register Top Menus
    function register_my_menus() {
    	register_nav_menus(
    		array(
    			'top-menu' => __( 'Top Menu' ),
    		)
    	);
    }
    add_action( 'init', 'register_my_menus' );
    // Add Secondary Menu Above Header
    function top_menu() {
       if ( has_nav_menu( 'top-menu' ) ) {
    	wp_nav_menu( array( 'theme_location' => 'top-menu',
    				'container_id'=>'top-menu',
    				'container_class' => 'menu clearfix ',
                    'menu_class' => 'sf-top-menu sf-js-enabled', // we assign the sf-menu class to the menu ul so that superfish works on this menu too
                    ) );
        }
    }
    add_action('thematic_header','top_menu', 0);
    Posted 3 years ago #
  3. Thanks for getting back to me Daniel.

    I'm fairly amateur at all of this I'm afraid. Should that just be put into my header.php? And how do I actually map and/or add the links?

    Apologies if this should be implicit!

    Tim.

    Posted 3 years ago #
  4. Danieliser
    Member

    If you have made changes to any files inside the thematic theme you downloaded then you honestly need to start over. You should have a sampletheme folder inside of the thematic folder, copy this to your themes directory. Rename it to whatever you want and you will see a functions.php and styles.css file in there. Those are the files you start modifying, you can make pretty much all changes in those. Add the above to the functions.php file and then go to the WP Menu Admin area and you will see Top Menu in the locations box. Assign your menu.

    Posted 3 years ago #
  5. Danieliser
    Member

    Also if you just wanted to move the main menu from below the header to above this would work.

    function remove_thematic_actions() {
        remove_action('thematic_header','thematic_access',9);
    }
    add_action('init','remove_thematic_actions');
    add_action('thematic_aboveheader','thematic_access');
    Posted 3 years ago #
  6. Daniel

    Thanks so much for taking the time to provide all of that. I've actually managed to find the solution in a similar way to which I had it originally.

    In stylesheet.css:

    #link_holder #home_link {
      display: block;
      width: 538px;
      height: 261px;
    } 
    
    #link_holder #button_link {
      display: block;
      width: 430px;
      height: 184px;
      position: absolute;
      left: 582px;
      top: 72px;
    }
    
    ...
    ...
    
    #link_holder #home_link a,
    #link_holder #button_link a,
    #link_holder #mail_link a,
    #link_holder #fb_link a,
    #link_holder #rss_link a,
    #link_holder #twitter_link a {
    	display: block;
    	width: 100%;
    	height: 100%;
    	text-decoration: none;
    }

    And header.php:

    <div id="link_holder">
      <div id="home_link"><a href="http://thenextchallenge.org/" title="Go to the homepage"></a></div>
      <div id="button_link"><a href="http://thenextchallenge.org/services/" title="Get helping planning your expedition"></a></div>
      <div id="mail_link"><a href="http://thenextchallenge.org/news/" title="Subscribe to my newsletter"></a></div>
      <div id="fb_link"><a href="http://www.facebook.com/pages/The-Next-Challenge/166058993337" title="Become a fan on Facebook">&nbsp;</a></div>
      <div id="rss_link"><a href="http://thenextchallenge.org/feed/" title="Subscribe to my feed"></a></div>
      <div id="twitter_link"><a href="http://twitter.com/nextchallenge/" title="Follow me on Twitter"></a></div>
    </div>

    Thanks again for your time.

    Tim.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.