Title: Visibility Help
Last modified: August 30, 2016

---

# Visibility Help

 *  Resolved [TheTJ](https://wordpress.org/support/users/measuringflower/)
 * (@measuringflower)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/)
 * 1) I have a bit of **HTML** that I want to be **visible everywhere _except_ the
   static home page** (I want it to be visible on [http://measuringflower.com/blog](http://measuringflower.com/blog)
   and on individual posts). What do I need to add to that HTML so that it does 
   that?
 * 2) Also, I have a bit of **PHP** that I want to be **visible _only_ in individual
   posts** (not pages, not the blog page, not the home page). How do I do that?
 * Thanks!
 * [http://www.measuringflower.com](http://www.measuringflower.com)
 * [https://wordpress.org/plugins/genesis-simple-hooks/](https://wordpress.org/plugins/genesis-simple-hooks/)

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

 *  Plugin Support [Nick C](https://wordpress.org/support/users/modernnerd/)
 * (@modernnerd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/#post-6623597)
 * Hi, MeasuringFlower!
 * WordPress provides “Conditional Tags” that let you output content depending on
   the current page you’re viewing: [https://codex.wordpress.org/Conditional_Tags](https://codex.wordpress.org/Conditional_Tags).
   You can use them with Genesis Simple Hooks or in your theme’s template files.
 * For example, to display content or run PHP everywhere except for your static 
   homepage, you could put this code in any Content Hooks box, being sure to tick“
   Execute PHP on this hook” next to the box:
 *     ```
       <?php
       if ( ! is_front_page() ) {
       	echo "<p>Hello, I'm your new content!</p>";
       }
       ?>
       ```
   
 * The `!` before `is_front_page()` can be read as ‘not’, as in _if not front page_.
   You can add that `!` before any conditional tag to make it negative. You can 
   also chain conditional tags together with ‘or’ as well as ‘and’ operators: [http://php.net/manual/en/language.operators.logical.php](http://php.net/manual/en/language.operators.logical.php)
 * For single posts, you can use the `is_single()` conditional tag: [https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page](https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page)
 *  Thread Starter [TheTJ](https://wordpress.org/support/users/measuringflower/)
 * (@measuringflower)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/#post-6623862)
 * Hi, Nick. Thanks. 🙂 I got the HTML to work perfectly. 😀
 * However, I can’t get the php bit to work. I’d like this bit of PHP to show only
   in single posts (I have no single.php file so can’t do that, hence the reason
   I’m trying to use Genesis Simple Hooks):
 * <?php zemanta_related_posts()?>
 * I’ve tried to make sense of codex stuff and put it to work, but I just can’t 
   get it. 🙁
 *  Plugin Support [Nick C](https://wordpress.org/support/users/modernnerd/)
 * (@modernnerd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/#post-6623891)
 * Hi, MeasuringFlower. Have you tried something like this?
 *     ```
       <?php
       if ( is_single() && function_exists( 'zemanta_related_posts' ) ) {
       	zemanta_related_posts();
       }
       ?>
       ```
   
 * That should work if you place it in one of the content areas and tick, “Execute
   PHP on this hook”.
 *  Thread Starter [TheTJ](https://wordpress.org/support/users/measuringflower/)
 * (@measuringflower)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/#post-6623904)
 * That did the trick! Thanks for your help, Nick! 😀

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

The topic ‘Visibility Help’ is closed to new replies.

 * ![](https://ps.w.org/genesis-simple-hooks/assets/icon-256x256.png?rev=1335659)
 * [Genesis Simple Hooks](https://wordpress.org/plugins/genesis-simple-hooks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/genesis-simple-hooks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/genesis-simple-hooks/)
 * [Active Topics](https://wordpress.org/support/plugin/genesis-simple-hooks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/genesis-simple-hooks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/genesis-simple-hooks/reviews/)

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [visible](https://wordpress.org/support/topic-tag/visible/)

 * 4 replies
 * 2 participants
 * Last reply from: [TheTJ](https://wordpress.org/support/users/measuringflower/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/visibility-help/#post-6623904)
 * Status: resolved