Grow your CSS skills. Land your dream job.

WordPress – category image

  • # September 25, 2012 at 1:12 am

    I have modified the categories.php and loop.php to display only the title of each post in my theme with the permalink. I have added an image field to the categories admin area so that when you make a new category, you can upload an image for that category. I am making a menu for a restaurant. So I will make a lunch category, upload a featured image for that category and then post several posts to that category that will display the title under the featured image. When you click on the title, it will take you to the post.

    I have this sort of working. I can get the featured image for the category by doing this

    $cat_image = get_option(‘category_image’);

    Viewing 1 post (of 1 total)

    You must be logged in to reply to this topic.

Projects

Colophon

CSS-Tricks* is created, written by, and maintained by Chris Coyier. It is built on WordPress, hosted by MediaTemple, and the assets are served by MaxCDN. The fonts are Source Sans and Source Code Pro. It is made possible by viewers like you who subscribe to The Lodge and through advertising for products and services I like.

*May or may not contain any actual "CSS" or "Tricks".