Title: threevisual's Replies | WordPress.org

---

# threevisual

  [  ](https://wordpress.org/support/users/threevisual/)

 *   [Profile](https://wordpress.org/support/users/threevisual/)
 *   [Topics Started](https://wordpress.org/support/users/threevisual/topics/)
 *   [Replies Created](https://wordpress.org/support/users/threevisual/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/threevisual/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/threevisual/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/threevisual/engagements/)
 *   [Favorites](https://wordpress.org/support/users/threevisual/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 72 total)

1 [2](https://wordpress.org/support/users/threevisual/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/threevisual/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/threevisual/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/threevisual/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/threevisual/replies/page/2/?output_format=md)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom post type template](https://wordpress.org/support/topic/custom-post-type-template-1/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-type-template-1/#post-1869941)
 * figured it out (I searched a bit longer and found the answer). Creating single-
   customposttypename.php did the job
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get odd / even posts](https://wordpress.org/support/topic/get-odd-even-posts/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/get-odd-even-posts/#post-1493847)
 * Worked like a charm. Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get odd / even posts](https://wordpress.org/support/topic/get-odd-even-posts/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/get-odd-even-posts/#post-1493841)
 * anyone have an idea of how I could get this to work?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get odd / even posts](https://wordpress.org/support/topic/get-odd-even-posts/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/get-odd-even-posts/#post-1493665)
 * thanks for the comment, sadly I have no idea how to put that into code (I can
   just about code wordpress templates but not php).
 * at the moment i’m using this for the first column:
 * `<?php global $post; $myposts = get_posts('numberposts=5'); foreach($myposts 
   as $post) : setup_postdata($post);?>`
 * I just need to adapt it so it shows even / odd posts.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Add column to post admin page?](https://wordpress.org/support/topic/add-column-to-post-admin-page/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/add-column-to-post-admin-page/#post-1449735)
 * anyone have any ideas? thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Post to category restriction?](https://wordpress.org/support/topic/post-to-category-restriction/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years ago](https://wordpress.org/support/topic/post-to-category-restriction/#post-1078277)
 * Thanks for the links, I’m trying to find something that won’t allow users to 
   see restricted categories in the edit screen though. Any other ideas?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if is in ‘news’ category but is not index](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/#post-1057498)
 * genius! thank you.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if is in ‘news’ category but is not index](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/#post-1057488)
 * Thanks Simon, yes that makes perfect sense, you’re right, the last post is in
   category ‘3’ just need to try and figure a way around this
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if is in ‘news’ category but is not index](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/#post-1057485)
 * so at the moment there is a news.php (the news landing page with a custom page
   template) and then separate posts in the news *category*.
 * The homepage has content from various categories but for some reason the code
   i’m using in the header…
 * `<li><a href="/news/" title="News" <?php if (is_page_template('news.php')) {?
   >class="current"<?php } ?><?php if (in_category('3')) {?>class="current"<?php}?
   >><span></span>News</a></li>`
 * confuses wordpress and when I’m on the index page it thinks it’s viewing content
   from the news category so shows the class as current for both the home button
   and the news button.
 * It’s quite hard to explain, so I’m not sure if that helped, but take a look at
   navigation at [http://www.wiredbristol.com/index.php](http://www.wiredbristol.com/index.php)
   and you’ll see what I mean (hopefully)
 * (basically I don’t want the news button to show as active if it’s the index page)
 * thanks again.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if is in ‘news’ category but is not index](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/if-is-in-news-category-but-is-not-index/#post-1057418)
 * thanks for the reply, it’s the news button that is causing the problem though,
   it’s showing as active on the homepage so I somehow need to tell it that if it’s
   the homepage don’t show the class=”current”
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin User Photo] Small PHP issue](https://wordpress.org/support/topic/small-php-issue/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/small-php-issue/#post-973144)
 * Brilliant, thanks for your help… worked perfectly, now I have to try and figure
   out how to edit that so it does the same for comment avatars.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin User Photo] Small PHP issue](https://wordpress.org/support/topic/small-php-issue/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/small-php-issue/#post-973027)
 * Still needing some help here, anyone have any ideas? Thank you.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Whats wrong with this code?](https://wordpress.org/support/topic/whats-wrong-with-this-code-1/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-code-1/#post-821065)
 * OK, I’ve had a look around and found that in_category doesn’t pick up sub-categories
   so you have to list them manually. For anyone else trying to do something similar
   here’s how you do it:
 *     ```
       <?php if ( in_category(2) || in_category (2) || in_category (3) || in_category (4) ) { ?>
       Content
       <?php } else { ?>
       Content
       <?php } ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Whats wrong with this code?](https://wordpress.org/support/topic/whats-wrong-with-this-code-1/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-code-1/#post-821064)
 * Is there anyway to modify this so its if in SUB category of x?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [<?php the_category(‘,’ ); ?> without link?](https://wordpress.org/support/topic/ltphp-the_category-gt-without-link/)
 *  Thread Starter [threevisual](https://wordpress.org/support/users/threevisual/)
 * (@threevisual)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/ltphp-the_category-gt-without-link/#post-876063)
 * worked perfectly! thanks!

Viewing 15 replies - 1 through 15 (of 72 total)

1 [2](https://wordpress.org/support/users/threevisual/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/threevisual/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/threevisual/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/threevisual/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/threevisual/replies/page/2/?output_format=md)