Title: echstudios's Replies | WordPress.org

---

# echstudios

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Count only a user’s first comments](https://wordpress.org/support/topic/count-only-a-users-first-comments/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/count-only-a-users-first-comments/#post-1183156)
 * Got it. Just use count(DISTINCT comment_post_id) in the SQL query.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [small problem with select query](https://wordpress.org/support/topic/small-problem-with-select-query/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/small-problem-with-select-query/#post-1182536)
 * Thanks shane, but I’m really looking to do this without a plugin. What I’m doing
   is actually more complicated than my example and I really prefer having full 
   control with my own functions.
 * I really just need to know how to run an sql count query of a specific array 
   of post ids?
 * Thanks, again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if/else inside foreach loop problem](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/#post-1139162)
 * alchymyth, new or not, you are absolutely right! I did indeed accidentally leave
   a space in my variable. Problem solved. Thanks so much. And thanks MichaelH for
   allowing him to find it. Really appreciate it guys!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if/else inside foreach loop problem](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/#post-1139155)
 * Now I take it this is just for testing purposes? This is what it prints on a 
   single loop iteration:
 *     ```
       stdClass Object
       (
           [user_id] => 2
           [post_id] => 131
           [action_type] =>  vote
           [action_time] => 2009-07-15 13:32:06
       )
       ```
   
 * Each loop is returning the proper values.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if/else inside foreach loop problem](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/#post-1139153)
 * My apologies. Here’s what I’m looking to do. I have a custom table with a specific
   field “action_type” that has 5 or so different possible values, example: ‘vote’,‘
   favorite’, ‘comment’, etc. I’m listing out the actions taken by users chronologically
   by time.
 * For example, if the action_type is ‘vote’ then write “Username has voted on Post
   17”,
    or if action_type is ‘favorite’, then write “Username has added Post 17
   to his favorites” etc.
 * The problem that I’m having is setting up a conditional statement to handle the
   output phrases within the foreach loop. When I test the current iteration for
   the action_type == ‘vote’, it seems to return true if ANY value in my array is‘
   vote’. Because of this, each and every loop iteration returns the same phrase
   as the first value that in the array returned trued.
 * However, like I said, if I simply echo out the action_type, each loop iteration
   will write the appropriate type: ie, ‘vote’ ‘vote’ ‘favorite’ ‘vote’ ‘comment’
   ect.
 * Please let me know if if that makes sense or if I can clarify any part. Thanks
   again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if/else inside foreach loop problem](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/#post-1138883)
 * Ya that was my first though but that too is not working. Its seems that the if/
   else is searching the entire array and returns true if the value is anywhere 
   in there instead of just on its current loop. But again, like I said, if I simply
   echo out the value, it echo the individual value of that loop.
 * [**moderated–bump removed.** Please refrain from bumping as per [Forum Rules](http://wordpress.org/support/topic/68664?replies=6)]
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if/else inside foreach loop problem](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/ifelse-inside-foreach-loop-problem/#post-1138873)
 * Thanks for the quick reply but that did not work. In fact that just made nothing
   show up.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot access empty property in /home/content/b/a/n/bannerLakes/html/blog/wp-inc](https://wordpress.org/support/topic/cannot-access-empty-property-in-homecontentbanbannerlakeshtmlblogwp-inc/)
 *  [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years ago](https://wordpress.org/support/topic/cannot-access-empty-property-in-homecontentbanbannerlakeshtmlblogwp-inc/#post-995430)
 * I have this same problem. I’m in PHPMyAdmin and have found an empty field in 
   the usermeta table. How do I delete the blank entry?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Run PHP on click](https://wordpress.org/support/topic/run-php-on-click/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years ago](https://wordpress.org/support/topic/run-php-on-click/#post-1079219)
 * Hey thanks.
 * What’s the markup look like to call that file? Ideally the hyperlink takes you
   nowhere, just runs the function, so how to I have it direct back to the same 
   page?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is category child?](https://wordpress.org/support/topic/is-category-child/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/is-category-child/#post-1071814)
 * I figured I should just post my code so you can see what I mean if that will 
   help.
 *     ```
       <ul class="nav-bar">
       			<li <?php if ( is_home() ) { echo ' class="current"'; } ?>><a href="<?php echo get_option('home'); ?>">HOME</a></li>
       			<li <?php if ( is_category('questions') ) { echo ' class="current"'; } ?>><a href="/rathers">QUESTIONS</a></li>
       			<li <?php if ( is_page('tags') ) { echo ' class="current"'; } ?>><a href="/tags">TAGS</a></li>
       			<li <?php if ( is_page('store') ) { echo ' class="current"'; } ?>><a href="/store">STORE</a></li>
       			<li <?php if ( is_page('submit') ) { echo ' class="current"'; } ?>><a href="/submit">SUBMIT</a></li>
       			<li <?php if ( is_page('about') ) { echo ' class="current"'; } ?>><a href="/about">ABOUT</a></li>
       			<li <?php if ( is_category('blog') ) { echo ' class="current"'; } ?>><a href="/blog">BLOG</a></li>
       		</ul>
       ```
   
 * It basically just changes the css class based on which page its on. So it works
   when I view the “Questions” category archive, but not when I view an actual post
   within the subcategories. I know I could just manually add all my subcategories
   as a conditional statement, but I have many so I’d like to find a cleaner way
   to handle this. Also, my blog is set up as its own category which also has the
   same problem.
 * Thanks again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is category child?](https://wordpress.org/support/topic/is-category-child/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/is-category-child/#post-1071811)
 * I need to use it in the header.php file to handle the active page highlight for
   my navigation bar.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: GD Star Rating] Rollover effect not working properly](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/#post-1070787)
 * Problem solved. My CSS was importing another un-needed css that included these
   styles:
 * .aligncenter { display:block; margin:0 auto }
    .alignleft { float:left } .alignright{
   float:right } .wp-caption { border:1px solid #666; text-align:center; background:#
   ccc; padding:10px; margin:10px }
 * Deleted that and it works great. Thanks for your help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: GD Star Rating] Rollover effect not working properly](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/#post-1070786)
 * I’ve looked through my css and played around with a few things but can’t seem
   to find the problem. But I also don’t know what I should be looking for because
   I’m not sure how the ratings are generated. Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: GD Star Rating] Rollover effect not working properly](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-gd-star-rating-rollover-effect-not-working-properly/#post-1070782)
 * Okay, thanks for the quick reply. I will look into it and get back with you shortly.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [numbered navigation links](https://wordpress.org/support/topic/numbered-navigation-links/)
 *  Thread Starter [echstudios](https://wordpress.org/support/users/echstudios/)
 * (@echstudios)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/numbered-navigation-links/#post-1069061)
 * Instead of just “Next” and “Previous” you often see:
 * 1 2 3 4 5 . . . 25 Next >
 * Is there a simple way to achieve this or will I have to make it from scratch?

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

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