Title: foochuck's Replies - page 3 | WordPress.org

---

# foochuck

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 31 through 45 (of 109 total)

[←](https://wordpress.org/support/users/foochuck/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/foochuck/replies/?output_format=md) [2](https://wordpress.org/support/users/foochuck/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/foochuck/replies/page/4/?output_format=md)…
[6](https://wordpress.org/support/users/foochuck/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/foochuck/replies/page/7/?output_format=md)
[8](https://wordpress.org/support/users/foochuck/replies/page/8/?output_format=md)
[→](https://wordpress.org/support/users/foochuck/replies/page/4/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Loop Through Child Pages](https://wordpress.org/support/topic/loop-through-child-pages/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/loop-through-child-pages/#post-2189407)
 * I found this solution:
 *     ```
       <?php query_posts(array('showposts' => 20, 'post_parent' => 7, 'post_type' => 'page')); while (have_posts()) { the_post(); ?>
   
       <h2><?php the_title(); ?></h2>
   
       <?php } ?>
       ```
   
 * However, how would I set post_parent to be the current page that’s using the 
   template, instead of explicitly defining a page ID?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Control sort order when using wp_get_attachment_image ?](https://wordpress.org/support/topic/control-sort-order-when-using-wp_get_attachment_image/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/control-sort-order-when-using-wp_get_attachment_image/#post-2184901)
 * I wanted to clarify that I only want to pull images on a specific page (this 
   is being used in a page template). Will get_posts still work?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Control sort order when using wp_get_attachment_image ?](https://wordpress.org/support/topic/control-sort-order-when-using-wp_get_attachment_image/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/control-sort-order-when-using-wp_get_attachment_image/#post-2184881)
 * Hello Christine,
 * The images are numbered in the order I want them to appear, but it’s have no 
   effect for how they appear on my page. Here’s the code I’m using:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Instapress] Fatal Error [Plugin Instapress] Version 1.3.1](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/)
 *  [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/#post-2166842)
 * [@tkrammer](https://wordpress.org/support/users/tkrammer/),
 * I used this link:
 * [http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/](http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/)
 * Please note that my php.ini didn’t have the following line in it:
 * ;extension=php_openssl.dll
 * So I added the following to the dynamic extensions section of php.ini:
 * extension=php_openssl.dll
 * And that worked.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Instapress] Fatal Error [Plugin Instapress] Version 1.3.1](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/)
 *  [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/#post-2166822)
 * Nevermind that, I found the solution and now instapress works! 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Instapress] Fatal Error [Plugin Instapress] Version 1.3.1](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/)
 *  [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-plugin-instapress-version-131/#post-2166821)
 * I’m having the same problem. I can’t find the openssl line in my php.ini to uncomment…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Blog pages show at most](https://wordpress.org/support/topic/blog-pages-show-at-most-4/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/blog-pages-show-at-most-4/#post-2153786)
 * I figured out the problem, my code was running outside of the loop. It’s been
   fixed. Thanks for your help!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Blog pages show at most](https://wordpress.org/support/topic/blog-pages-show-at-most-4/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/blog-pages-show-at-most-4/#post-2153720)
 * mfshearer72,
 * I noticed that shortly after posting this. I removed the code `&posts_per_page
   =-1` – so now the page does only display 4 posts.
 * However I can’t get the following code to show up:
 *     ```
       <?php if ( $wp_query->max_num_pages > 1 ) : ?>
       	<div id="nav-above" class="navigation">
       		<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
       		<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
       	</div><!-- #nav-above -->
       <?php endif; ?>
       ```
   
 * Should I use something besides wp-query?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130974)
 * I was just printing out the array and saw that too…thanks very much!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130972)
 * Yes, I did catch that the cat id was off. No luck on the single post pages yet…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130970)
 * PS – I did change the 20 to 23 in your code for single post as that’s the correct
   ID for my news category, however it’s still not working.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130969)
 * That code works for the category pages, but not for the single post pages.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130962)
 * I should clarify, I’m using this in header.php but I need it to apply to single
   post pages, where you are seeing the permalink for a blog post.
 * I need it to detect if the article has the parent news category.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130956)
 * I’m using this in header.php so it will be global throughout all pages on my 
   site.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional for parent category](https://wordpress.org/support/topic/conditional-for-parent-category/)
 *  Thread Starter [foochuck](https://wordpress.org/support/users/foochuck/)
 * (@foochuck)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/conditional-for-parent-category/#post-2130944)
 * esmi,
 * This is the code I’m using, however it’s not working correctly:
 *     ```
       <h1 id="logo">
       <?php
       $in_news = 0; // set a flag varable to false
       $cats = get_the_category();
       foreach ( $cats as $cat ) {
       	if( in_array( '23', get_ancestors( $cat, 'category' ) ) ) $in_news = 1; // set flag to true
       }
       if( $in_news == 1 || is_category(23)) : ?>
       <a href="http://localhost/test"><img width="345" height="176" src="http://localhost/test/wp-content/uploads/logo-old.png"></a>
       <?php else : ?>
       <a href="http://localhost/test"><img width="345" height="176" src="http://localhost/test/wp-content/uploads/logo.png"></a>
       <?php endif; ?>
       </h1>
       ```
   
 * The else works on all pages. ‘is_category(23)’ works for the news page. However
   for all news sub categories, it’s showing logo.png instead of ‘logo-old.png’

Viewing 15 replies - 31 through 45 (of 109 total)

[←](https://wordpress.org/support/users/foochuck/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/foochuck/replies/?output_format=md) [2](https://wordpress.org/support/users/foochuck/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/foochuck/replies/page/4/?output_format=md)…
[6](https://wordpress.org/support/users/foochuck/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/foochuck/replies/page/7/?output_format=md)
[8](https://wordpress.org/support/users/foochuck/replies/page/8/?output_format=md)
[→](https://wordpress.org/support/users/foochuck/replies/page/4/?output_format=md)