Title: Exclude from posts?
Last modified: August 19, 2016

---

# Exclude from posts?

 *  [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/)
 * I have a video site and I use a plugin that displays a report button. I have 
   edited it so that it only shows the report button on the pages that have no children(
   the videos) successfully.
 *     ```
       $pagekids = get_pages("child_of=".$post->ID."&exclude=166,206,230,1127");
       if ($pagekids) {}
       else {
       return $text;
       }
       ```
   
 * My problem is, it is also showing up on my posts which I don’t want it to do.
   Help please!

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

 *  Thread Starter [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094059)
 * *cough*Bump*cough*
 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094062)
 * Hi,
 * [http://codex.wordpress.org/Template_Tags/query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
   
   [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * Thanks,
 * Shane G.
 *  [jontasc](https://wordpress.org/support/users/jontasc/)
 * (@jontasc)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094066)
 * try:
    if($pagekids && is_page()) {}
 * I’m not completely following your problem, but it seems like it could be solved
   with [conditional tags.](http://codex.wordpress.org/Conditional_Tags)
 *  Thread Starter [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094158)
 * I only want the report button on pages, not posts. Is there any way to accomplish
   this?
 *  Thread Starter [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094166)
 * *cough*Bump*cough*
 *  Thread Starter [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094215)
 * I really need help with this. It’s driving me nuts!
 *  Thread Starter [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * (@jonnyh431)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094216)
 * I’m desperate!!!

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

The topic ‘Exclude from posts?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [jonnyh431](https://wordpress.org/support/users/jonnyh431/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/exclude-from-posts/#post-1094216)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
