WordPress.org

Ready to get started?Download WordPress

Forums

Can I use More than one color for Category List? Like assign 2 Classes to a list (4 posts)

  1. vivsin
    Member
    Posted 5 years ago #

    What I want to do is, Use two different classes in same list like Category, recent post etc

    Visually:

    consider this code

    <h2> (#sidebar h2)Categories</h2>

      <li class1> first category </>
      <li class2> second cat </>
      <li class1> third cat </>

      is it possible?

  2. moshu
    Member
    Posted 5 years ago #

    Honestly, why is so difficult for a "Web Developer" (?) to do a right click and take a look at the source code? Or the read the **** documentation?

  3. vivsin
    Member
    Posted 5 years ago #

    Honestly, why is so difficult for a "Web Developer" (?) to do a right click and take a look at the source code? Or the read the **** documentation?

    I dont think that u got my point.

    i am talking about automatically generated LIST items like, category, recent posts and specially the list generated by CATEGORY POST plugin

    I want to use 2 classes, for same list.

  4. DJ Allyn
    Member
    Posted 5 years ago #

    bump

    I, too, am trying to list each category with its own class. I would like the output to look like something like this in my sidebar:

    a href="http://mydomain.com/?cat=1" cat=1/a
    a href="http://mydomain.com/?cat=2" cat=2 /a
    a href="http://mydomain.com/?cat=3" cat=3 /a

    This way I can create a style for each category and color code them.

    I have already figured out how to call the different class names by using the php the_category_unlinked('') tag and using the category slug as the class name.

    All I need to do is figure out how to get the class= into the line.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags