Title: greencode's Replies - page 20 | WordPress.org

---

# greencode

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 286 through 300 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/page/19/?output_format=md)
[1](https://wordpress.org/support/users/greencode/replies/?output_format=md) [2](https://wordpress.org/support/users/greencode/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)…
[19](https://wordpress.org/support/users/greencode/replies/page/19/?output_format=md)
20 [21](https://wordpress.org/support/users/greencode/replies/page/21/?output_format=md)…
[34](https://wordpress.org/support/users/greencode/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/greencode/replies/page/35/?output_format=md)
[36](https://wordpress.org/support/users/greencode/replies/page/36/?output_format=md)
[→](https://wordpress.org/support/users/greencode/replies/page/21/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Page array not working](https://wordpress.org/support/topic/page-array-not-working/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/page-array-not-working/#post-3101249)
 * Umm, I tried this instead
 *     ```
       <?php
       $args = array(
         'post_type' => 'page',
         'post__in' => get_post_meta($post->ID, "page_id")
         );
       query_posts($args);
       ?>
       ```
   
 * But still only one page displays.
 * I then tried
 *     ```
       <?php
       $args = array(
         'post_type' => 'page',
         'post__in' => array(get_post_meta($post->ID, "page_id", false))
         );
       query_posts($args);
       ?>
       ```
   
 * and nothing displays.
 * I tried this, just to make sure it was working when not using the custom field
   value
 *     ```
       <?php
       $args = array(
         'post_type' => 'page',
         'post__in' => array(361,363)
         );
       query_posts($args);
       ?>
       ```
   
 * and it displays okay
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ambrosite Next/Previous Post Link Plus] [Plugin: Ambrosite Next/Previous Post Link Plus] WPML Patch](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/#post-3093255)
 * Okay, thanks. I will do. If I get any results I’ll let you know.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ambrosite Next/Previous Post Link Plus] [Plugin: Ambrosite Next/Previous Post Link Plus] WPML Patch](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/#post-3093249)
 * Umm, replacing the code
 *     ```
       $result = $wpdb->get_results("SELECT DISTINCT p.* FROM $wpdb->posts AS p $join $where $sort");
       ```
   
 * on line 204 with
 *     ```
       global $table_prefix;
       if ( function_exists('icl_sitepress_activate') ) {
       $result = $wpdb->get_results("SELECT DISTINCT p.* FROM $wpdb->posts AS p,{$table_prefix}icl_translations AS icl_translations $join $where
       AND p.ID = icl_translations.element_id AND icl_translations.language_code = '" . ICL_LANGUAGE_CODE . "' $sort");
       } else {
       $result = $wpdb->get_results("SELECT DISTINCT p.* FROM $wpdb->posts AS p $join $where $sort");
       }
       ```
   
 * causes nothing to display in either default or foreign language.
 * I’m using this code to display the previous/next nav
 *     ```
       <div class="nav-arrows-head">
       <div class="nav-previous"><?php previous_post_link_plus( array('order_by' => 'menu_order', 'in_same_cat' => true, 'loop' => true, 'format' => '%link', 'link' => 'Previous') ); ?></div>
       <div class="nav-next"><?php next_post_link_plus( array('order_by' => 'menu_order', 'in_same_cat' => true, 'loop' => true, 'format' => '%link', 'link' => 'Next') ); ?></div>
       </div>
       ```
   
 * Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ambrosite Next/Previous Post Link Plus] [Plugin: Ambrosite Next/Previous Post Link Plus] WPML Patch](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-ambrosite-nextprevious-post-link-plus-wpml-patch/#post-3093234)
 * Apologies. Could you add the code how it should be. Not sure where the } needs
   to go.
 * Thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if in taxonomy](https://wordpress.org/support/topic/if-in-taxonomy/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/if-in-taxonomy/#post-3093093)
 * Ah! Looks like I’ve found the answer:
 *     ```
       <?php
       if ( has_term( 'countryside','collection' )) {
               echo 'Works';
       } else {
       	echo 'Does not work!';
       }
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Members - Membership & User Role Editor Plugin] [Plugin: Members] Where Are the Shortcodes?](https://wordpress.org/support/topic/plugin-members-where-are-the-shortcodes/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-members-where-are-the-shortcodes/#post-3037138)
 * There’s actually 2 x readme files. One at root (you don’t want that) and one 
   in this folder:
 * members/docs/readme.html#shortcodes
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sticky Posts in WP_Query](https://wordpress.org/support/topic/sticky-posts-in-wp_query/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/sticky-posts-in-wp_query/#post-3046699)
 * Thanks for this. I’ve tried using this but what seems to happen is the sticky
   post then also shows up in the second loop. here’s my code:
 *     ```
       <?php
         $temp = $wp_query;
         $wp_query = new WP_Query( array( 'posts_per_page' => '-1', 'paged' => $paged, 'cat' => 275, 'post__in' => get_option('sticky_posts')));
         while ($wp_query->have_posts()) : $wp_query->the_post();
       ?>
       <a href="<?php the_permalink() ?>"><?php the_title() ?></a>
       <?php endwhile;?>
       <?php wp_reset_postdata(); ?>
       <?php
         $temp = $wp_query;
         global $more; $more = 0;
         $wp_query = new WP_Query( array( 'posts_per_page' => '10', 'ignore_sticky_posts' => 1, 'post__not_in' => $sticky, 'paged' => $paged, 'cat' => 275));
         while ($wp_query->have_posts()) : $wp_query->the_post();
       ?>
       <a href="<?php the_permalink() ?>"><?php the_title() ?></a>
       <?php endwhile;?>
       <?php wp_reset_postdata(); ?>
       <div class="grid_9">
       <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Category or Page?](https://wordpress.org/support/topic/category-or-page-1/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/category-or-page-1/#post-3023650)
 * Oooh, I like that idea. Very neat.
 * I suppose with regards to the slugs I’ll just have to name the categories something
   like blog-category, news-category etc so I can then call the pages blog, news
   etc.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Different number of posts on category page 1](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/page/3/#post-2833252)
 * Great, thanks again.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Different number of posts on category page 1](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/page/3/#post-2833250)
 * Thank you sooooooo much for this. It works absolutely perfectly. Really appreciate
   your constant help on this issue. I wouldn’t have had a clue where to begin with
   this.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Different number of posts on category page 1](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/page/3/#post-2833243)
 * Hi. I’ve also got a news category that has only 6 posts but what’s happening 
   is the first 5 are showing on the first page – as they should – and the page 
   numbers are showing as 1 and 2 – again correct – but if I click page 2 I get 
   a Page Not found. I then just increased the number of posts showing on the home
   page from 5 to 10 and all posts are then showing but the page numbers 1 and 2
   are still showing!
 * Really lost with this one.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Different number of posts on category page 1](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/different-number-of-posts-on-category-page-1/page/3/#post-2833242)
 * So sorry not to get back to you about this. I’ve been fighting fires with fires
   at work!
 * I tried exactly as you mentioned in your previous message but I get the following
   error when attempting to view that category:
 * Fatal error: Call to undefined method WP_Query::is_main_query() in /home/mysite/
   public_html/dev/wp-content/themes/mytheme/functions.php on line 16
 * Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy Table] [Plugin: Easy Table] Commas in cells?](https://wordpress.org/support/topic/plugin-easy-table-commas-in-cells/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-easy-table-commas-in-cells/#post-2868738)
 * Sorry. I just checked your site and can see I just need to enclose commas with
   quotes I.e. “red, blue, yellow”
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Breadcrumb NavXT] [Plugin: Breadcrumb NavXT] Compatibility request with WPML](https://wordpress.org/support/topic/plugin-breadcrumb-navxt-compatibility-request-with-wpml/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-breadcrumb-navxt-compatibility-request-with-wpml/#post-2844254)
 * Apologies for not getting back to you regarding this. Been up to my neck in work
   at the minute. I’ll take a look this weekend if that’s okay.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [post__not_in query](https://wordpress.org/support/topic/post_not_in-query/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/post_not_in-query/#post-2844231)
 * Thanks for this – works perfectly

Viewing 15 replies - 286 through 300 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/page/19/?output_format=md)
[1](https://wordpress.org/support/users/greencode/replies/?output_format=md) [2](https://wordpress.org/support/users/greencode/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)…
[19](https://wordpress.org/support/users/greencode/replies/page/19/?output_format=md)
20 [21](https://wordpress.org/support/users/greencode/replies/page/21/?output_format=md)…
[34](https://wordpress.org/support/users/greencode/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/greencode/replies/page/35/?output_format=md)
[36](https://wordpress.org/support/users/greencode/replies/page/36/?output_format=md)
[→](https://wordpress.org/support/users/greencode/replies/page/21/?output_format=md)