• Resolved jmsole

    (@jmsole)


    Hi. I’m new at wordpress and I have a problem I can’t solve. I’m using the Imbalance Theme by WPSHOWER to make my portfolio (jmsole.cl) and I have modified it a bit. The problem I’m having is that I want the roll over color of the grid elements in the startpage to change color automaticaly depending on the category it belongs to.
    I been trying for a while and I can change them manually in the .css, but doing it that way I have to specify the column and the post-id, so if I add a new post I have to change everything again.
    Hope there’s someone who can help me.
    Thanks in advance

    JM Solé

    PS: I hope you understand that english is noy my native language, please forgive me for any error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • check if you could use post_class() in the post’s div, which will give category-dependant css classes to the post div (apart from many other css classes as well)

    http://codex.wordpress.org/Template_Tags/post_class

    Thread Starter jmsole

    (@jmsole)

    Thank you alchymyth, I tried to use post_class() in the blog.php of the theme, in the area that defines the post thumbnail. I think that what I need to do is to assign post_class() to class="preview", because when I modify .preview in the .css the backgorund of the roll over changes. But I really am a newbie when it come to WordPress.
    I think I have to get to a point where I can put .preview.category-5 in the .css and assign to that the background color. I think that’s the easiest way to do it, but I don’t know how to modify blog.php for that CSS code to work.

    Thank you again. I hope someone can tell me what to write in the .php, because I think I don’t have the ability to decifer this.

    JM Solé

    Thread Starter jmsole

    (@jmsole)

    Yeasterday I found this post and now it works like I wanted it to work. And of course, I was trying to put the code in the wrong .php. Thank you alchymyth for your help.

    JM Solé

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I change roll over color depending on category, Imbalance Theme’ is closed to new replies.