WordPress.org

Forums

add css class to php (3 posts)

  1. Famous
    Member
    Posted 1 year ago #

    How can I add a css class to the li's in the php code below?

    <?php wp_list_bookmarks('categorize=0&category=2&before=<span>&after=</span>&show_images=1&show_description=0&orderby=url'); ?>

  2. jevets
    Member
    Posted 1 year ago #

    Review http://codex.wordpress.org/Function_Reference/wp_list_bookmarks

    There's a class argument.

    <?php wp_list_bookmarks('class=MYCUSTOMCLASS&categorize=0&category=2&before=<span>&after=</span>&show_images=1&show_description=0&orderby=url'); ?>

  3. Famous
    Member
    Posted 1 year ago #

    Didn't see that before thanks. But I am not quite sure I understand it.

    I want a header (category #2)
    then I would like to apply a class to the li elements below:

    <div class=myClass>image</div> so it shows up like:

    Category Heading
    image image image image image image

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags