WordPress.org

Ready to get started?Download WordPress

Forums

How do I output HTML for certain category posts? (4 posts)

  1. ericreynolds007
    Member
    Posted 1 year ago #

    I created a Real Estate web site that works well. However, I have one last thing to do. I need "Sale Pending" and "Sold" to display on property listings that are either in escrow or have been sold.

    What would be great is if I could set up "Sale Pending" and "Sold" categories and any post assigned to either category will output the HTML within the post.

    I believe that I need to insert conditional code into my single.php file in order to make this work. Not sure. Anyone know how?

    Thx.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Does your theme use the body_class() and/or post_class() functions?

  3. alchymyth
    Forum Moderator
    Posted 1 year ago #

    will output the HTML within the post

    where exactly?

    insert conditional code into my single.php file

    consider to use: in_category()

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

  4. ericreynolds007
    Member
    Posted 1 year ago #

    Esmi. My theme is an Elegant Theme, and I believe it uses the body_class().

    Alchymyth, I would like the post to output HTML in the description, just above the content, in an H2 tag. :)

Topic Closed

This topic has been closed to new replies.

About this Topic