How to modify displayed link's attributes? (3 posts)

  1. flamey
    Posted 9 years ago #

    Since there seems to be no way to add "nofollow" to selected links through the admin pannel, i figured i'll just set the ones i need to rel=muse and change muse to nofollow when the link is being displayed. However, I've looked thorugh http://codex.wordpress.org/Plugin_API/Hooks#Filter_Hooks and didn't find anything to help hook to any event when a link is being requiested/displayed.

    Right now i hacked get_links() and i do it there, but is there a way to do it through the plug-in? what event should i hook for this?

    thanks in advance!

  2. Chris_K
    Posted 9 years ago #

    There are a handful of plugins that do this already, for what that's worth.

    Granted, if you're looking for a learning experience then just ignore this!

  3. flamey
    Posted 9 years ago #

    Have you even looked at the search results you sending me to before including it in your post? :) there are billion and one plugin to add or remove nofollow from comments and/or articles. but i dare you point me to single one that does that for sidebar links, you know, the ones you add throught the admin pannel. especially selectively, not all or none.

    well, good thing its not a hard hack. besides i could add a hack to add "nofollow" as an option for rel in the admin pannel, or even make a plugin to do it (just have to see if right hooks are available).

Topic Closed

This topic has been closed to new replies.

About this Topic