adding nofollow to a Wordpress query?

Discussion in 'WordPress' started by Pixelrage, Jun 25, 2008.

  1. #1
    Is it possible to add nofollow to code such as this:

    <?php query_posts('showposts=5'); ?>
    Code (markup):
    There are a few areas where I list the 5 most recent articles, 5 most popular articles, etc - and want to make sure all of the links are always set to nofollow.
     
    Pixelrage, Jun 25, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes you would add it after this where you are defining the post..
    So you do this:

    <?php query_posts('showposts=5'); ?>

    and then you are choosing what to display from the post i assume e.g:

    <a href="the_permalink()" add no follow here>the_title()</a>


    <?php endwhile; ?>

    That's not the exact code but that's what your code should look like? After the query you choose what to show from the query, so if you are showing links then add it in there.
     
    wd_2k6, Jun 25, 2008 IP