Title: Function Reference Help.
Last modified: August 20, 2016

---

# Function Reference Help.

 *  Resolved [jnegron101](https://wordpress.org/support/users/jnegron101/)
 * (@jnegron101)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/function-reference-help/)
 * Hello all. Im working on this little reference code snippet,
    the code listed
   below kicks back a “yesha” if a post is in category 45 OR our town OR delete
 *     ```
       <?php
       if (in_category( array( 45, 'our-town', 'delete' ) )) {
        echo "yesha";
       } else {
       	echo "no";
       }.....
       ```
   
 * Im looking for something that does this. >
    Echo “yeshsa” if post is in category
   45 AND our town AND delete So it would be conditional if the post is in these
   multiple categories.
 * Any help would be appreciated.
    J

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/function-reference-help/#post-2554833)
 * have you tried some old fashioned logical operation such as:
 *     ```
       if ( in_category(45) && in_category('our-town') && in_category('delete') ) {
       ```
   
 *  Thread Starter [jnegron101](https://wordpress.org/support/users/jnegron101/)
 * (@jnegron101)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/function-reference-help/#post-2555054)
 * thanks Sir. perfect approach to it.

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

The topic ‘Function Reference Help.’ is closed to new replies.

## Tags

 * [category display](https://wordpress.org/support/topic-tag/category-display/)
 * [functions](https://wordpress.org/support/topic-tag/functions/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [jnegron101](https://wordpress.org/support/users/jnegron101/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/function-reference-help/#post-2555054)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
