1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add NOFOLLOW

Discussion in 'PHP' started by alien, Jul 22, 2010.

  1. #1
    <div id="navbarleft">
    
    		<ul id="nav">
    
    			
    			<?php wp_list_pages('title_li=&depth=4&sort_column=menu_order'); ?>
    
    		</ul>
    
    	</div>
    PHP:
    How to add nofollow link to pages in the above code?
     
    alien, Jul 22, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    It looks like a wordpress function. I did a little research for you, you could've google it. Anyway, here's how:
    You need to install this wordpress plugin. Then replace:
    
    <?php wp_list_pages('title_li=&depth=4&sort_column=menu_order'); ?>
    
    PHP:
    With this:
    
    <?php add_link_attr('wp_list_pages', 'title_li=&depth=4&sort_column=menu_order', 'rel="nofollow"'); ?>
    
    PHP:
    I haven't tried it myself, hope it works.
     
    Rainulf, Jul 22, 2010 IP
  3. alien

    alien Well-Known Member

    Messages:
    1,844
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    190
    #3
    thanks, it works :)
     
    alien, Jul 23, 2010 IP