WordPress.org

Ready to get started?Download WordPress

Forums

image/buttons for category list? (3 posts)

  1. Skeary
    Member
    Posted 5 years ago #

    I'm playing with making a list of categories that, rather than the list is certain images, like 'category-1.jpg' etc. Would that be possible? I know it's not really best practice, but this is an artist's website lol

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    This is probably best handled using CSS to insert image backgrounds and then push the text off screen. But you'd need to use get_categories() and run a foreach loop with some if/else, or switch, statements to insert the necessary ids/classes.

    Do-able but not simple unless you're comfortable with PHP and CSS.

    http://codex.wordpress.org/Function_Reference/get_categories

  3. Skeary
    Member
    Posted 5 years ago #

    thanks for the comments :)
    that might be a bit beyond my ken right now.. hmm.

    i could, though to be reallylame, just put straight up xhtml in my sidebar.php instead of the php get_categories function right? i know, i know. but that seems like the quickest solution right now.. not too much chance of categories changing.

Topic Closed

This topic has been closed to new replies.

About this Topic