1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Thesis and Nofollow Question

Discussion in 'Blogging' started by silvertroll, Jun 5, 2010.

  1. silvertroll

    silvertroll Registered Member

    Mar 7, 2010
    Likes Received:
    I didn't know in what section to post it so I hope it's fine.

    What I want to do is to add nofollow links to useless pages like privacy policy for seo purposes. Now, thesis allegedly gives you the option to add nofollow attribute to any page you want, but if you have the page on the navigation menu it won't be nofollow (I succeeded to add nofollow only to the homepage since thesis gives you the option to do this only with the homepage navigation menu link).

    I don't mind messing with wordpress core files, any idea of how to achieve it?

    Any help would be appreciated ;)
  2. nasif123

    nasif123 Newbie

    Aug 6, 2010
    Likes Received:
    Unfortunately thesis has no function to put nofollow in navigation menu by default. So what you can do is to edit custom_function.php to remove default thesis menu and to add a customize nav menu by thesis hook.

    What you need to do is to add the following code at the end of custom_function.php:

    function squeeze_nav() {
    	if (is_page('Squeeze')) { ?>
    		<ul class="menu">
    			<li class="tab"><a href="[HYPERLINK]" rel="nofollow">Link 1</a></li>
    			<li class="tab"><a href="[HYPERLINK]" rel="nofollow">Link 2</a></li>
    			<li class="tab"><a href="[HYPERLINK]" rel="nofollow">Link 3</a></li>
    			<li class="tab"><a href="[HYPERLINK]" rel="nofollow">Link 4</a></li>
    			<li class="tab"><a href="[HYPERLINK]" rel="nofollow">Link 5</a></li>
    	<?php }
    	else { thesis_nav_menu(); }
    remove_action('thesis_hook_before_header', 'thesis_nav_menu'); // remove default nav menu
    add_action('thesis_hook_before_header', 'squeeze_nav'); // replace with custom nav menu on squeeze page and default nav menu everywhere else