Forums

[resolved] Using add_link_attr with wp_list_categories (6 posts)

  1. chris2006
    Member
    Posted 4 years ago #

    Hey,

    I'm currently using

    <?php wp_list_categories('orderby=name&title_li='); ?>

    To display my category listings, could anyone show me the way to incorporate that with the add_link_attr attribute to append rel="NoFollow" to the category links.

    Thankyou

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    <?php add_link_attr('wp_list_categories', 'orderby=name&title_li=', 'rel="nofollow"'); ?>
  3. chris2006
    Member
    Posted 4 years ago #

    Thanks for the quick reply but i'm getting some errors with that snippet:

    Fatal error: Call to undefined function: add_link_attr() in /home/blah/public_html/wp-content/themes/blah/sidebar.php on line 65

  4. whooami
    Member
    Posted 4 years ago #

    do you actually have the plugin installed and activated?

    thats not a default WP function, you need Kaf's plugin

  5. chris2006
    Member
    Posted 4 years ago #

    Boy is my face red :P

    Thanks for the great help guys :)

  6. Kafkaesqui
    Moderator
    Posted 4 years ago #

    :D

Topic Closed

This topic has been closed to new replies.

About this Topic