WordPress.org

Ready to get started?Download WordPress

Forums

attempt at multiple loop with in_category (3 posts)

  1. flowtops
    Member
    Posted 3 years ago #

    Hi guys,

    I'd like to change the multiple loop in TwentyTen to a very simple one where I can use in_category to define a few variables in the design of posts (borders, fonts).

    I've come up with this so far:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Are my endifs and endwhiles in the right place? Is it correct of me to assume I can add classes to my child theme stylesheet to alter fonts etcetera for the content?

    In the end, the three categories will turn up as posts on three pages, each accessed from my menu.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Don't edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    Twenty Ten uses post_class() in the post div, which should create category dependant css classes for the post; you might want to check if these are suffficient for your styling.

    and of course, you can add these styles to the stylesheet of the child theme.

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

Topic Closed

This topic has been closed to new replies.

About this Topic