Title: PHP code help
Last modified: August 20, 2016

---

# PHP code help

 *  [tomelk31](https://wordpress.org/support/users/tomelk31/)
 * (@tomelk31)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/php-code-help-4/)
 * I want to remove a sidebar widget from a particular page on my blog. I use is_home()
   for widgets I only want on my home page. What do I use if I don’t want it to 
   show on my Register page?

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

 *  [水野史土](https://wordpress.org/support/users/ounziw/)
 * (@ounziw)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/php-code-help-4/#post-3012183)
 * WordPress has `is_page()` function.
 * [http://codex.wordpress.org/Function_Reference/is_page](http://codex.wordpress.org/Function_Reference/is_page)
   
   Examples is_page(); // When any single Page is being displayed.
 * is_page(42);
    // When Page 42 (ID) is being displayed.
 * is_page(‘Contact’);
    // When the Page with a post_title of “Contact” is being
   displayed.
 * is_page(‘about-me’);
    // When the Page with a post_name (slug) of “about-me” 
   is being displayed.
 * is_page(array(42,’about-me’,’Contact’));
    // Returns true when the Pages displayed
   is either post ID 42, or post_name “about-me”, or post_title “Contact”. Note:
   the array ability was added at Version 2.5.
 *  Thread Starter [tomelk31](https://wordpress.org/support/users/tomelk31/)
 * (@tomelk31)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/php-code-help-4/#post-3012216)
 * If I use in_page(‘register’) would that mean display widget only on this page
   or display idget on every other page but this one? Thanks

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

The topic ‘PHP code help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [tomelk31](https://wordpress.org/support/users/tomelk31/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/php-code-help-4/#post-3012216)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
