Title: Basic &#8220;If&#8230;else&#8230;&#8221; statement
Last modified: August 18, 2016

---

# Basic “If…else…” statement

 *  [slappo](https://wordpress.org/support/users/slappo/)
 * (@slappo)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/)
 * Can someone tell me how to do a basic if…else statement in php? What I want to
   do is within the loop, create a statement that checks which category a post is
   coming from, and if it comes from a certain category (my “about” category), then
   display the post without the comment/feedback stuff, and if the post is not from
   that category, then display the post with all the normal stuff.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [slappo](https://wordpress.org/support/users/slappo/)
 * (@slappo)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/#post-68946)
 * Thanks for the link. I’m trying to do it php, though. I’ve created an about page
   that’s hidden from the categories list, but all I want to do is get rid of the“
   comments” and “leave a comment” info when I call that post. There’s no way to
   do this easily?
 *  [oriecat](https://wordpress.org/support/users/oriecat/)
 * (@oriecat)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/#post-68967)
 * Can’t you just uncheck Allow Comments in the related posts??
 *  Anonymous
 * [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/#post-68968)
 * I’m a raw beginner. I’m now online , operating and posting (whew) and want to
   go further. Need 1,2,3, steps description on how to add pictures and graphics
   to my site. Also where can I go to get a glossary of blog terms?
 *  Thread Starter [slappo](https://wordpress.org/support/users/slappo/)
 * (@slappo)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/#post-68972)
 * Unchecking “Allow Comments” just takes away the comments themselves, not the 
   title of the section “comments” or the “leave a comment” title either. I want
   to get rid of those design elements themselves. Which is stuff that’s listed 
   under the div=post

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Basic “If…else…” statement’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [slappo](https://wordpress.org/support/users/slappo/)
 * Last activity: [21 years, 11 months ago](https://wordpress.org/support/topic/basic-ifelse-statement/#post-68972)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
