Forums

How to insert events and attributes into wp_* links (1 post)

  1. cognitions
    Member
    Posted 2 years ago #

    This seems so simple yet I cannot achieve it without modifying the core code.

    I want to be able to insert either an onClick event or an attribute like link="attribute" into the output html that derives from things like:

    <?php wp_list_categories('show_count=1; ?>
    or
    <?php wp_list_pages ?>

    so that the output would be
    Uncategorized
    The problem is how to inject rel="MyValue" onclick="MyValue"
    into
    <?php wp_list_categories ?>

    Can anyone help?

    Many thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic