Title: greencode's Replies - page 12 | 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 - 166 through 180 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/page/11/?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)…
[11](https://wordpress.org/support/users/greencode/replies/page/11/?output_format=md)
12 [13](https://wordpress.org/support/users/greencode/replies/page/13/?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/13/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Replace Product Image with Thumbnail on Click](https://wordpress.org/support/topic/replace-product-image-with-thumbnail-on-click/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/replace-product-image-with-thumbnail-on-click/#post-7393089)
 * The link to the dev product is [http://www.daretothink.co.uk/clients/chocbloc/product/chocbloc/](http://www.daretothink.co.uk/clients/chocbloc/product/chocbloc/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes] Revisor cannot edit featured image](https://wordpress.org/support/topic/revisor-cannot-edit-featured-image/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years ago](https://wordpress.org/support/topic/revisor-cannot-edit-featured-image/#post-6758926)
 * Did you ever have any luck with this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Syntax error in "Additional Headers" field with Reply-to](https://wordpress.org/support/topic/syntax-error-in-additional-headers-field-with-reply-to/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/syntax-error-in-additional-headers-field-with-reply-to/#post-7220102)
 * Thanks [@jane](https://wordpress.org/support/users/jane/) – I was having the 
   same issue and have now changed from text to email and everything validates correctly.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme Check] Non-hyphenated Theme Slug](https://wordpress.org/support/topic/non-hyphenated-theme-slug/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/non-hyphenated-theme-slug/#post-7035065)
 * Thanks for the quick response and clearing that up.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Delete field in DB](https://wordpress.org/support/topic/delete-field-in-db/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/delete-field-in-db/#post-6971887)
 * Thanks Michael. Much appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Multiple Additional Settings](https://wordpress.org/support/topic/multiple-additional-settings/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multiple-additional-settings/#post-6399987)
 * Hi [@takayuki](https://wordpress.org/support/users/takayuki/). Apologies for 
   not getting back to you until today. I didn’t get notified by email that a reply
   had been made. The site is live but I’m having to stop using the trackEvent due
   to this issue. The site is [http://www.silogika.com/register](http://www.silogika.com/register)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields Repeater & Flexible Content Fields Collapser] Incompatible with ACF Pro 5.2.7](https://wordpress.org/support/topic/incompatible-with-acf-pro-527/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/incompatible-with-acf-pro-527/#post-6259616)
 * UPDATE: Apologies, I had some other weird thing going on in my functions file!
   This filder works perfectly.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields Repeater & Flexible Content Fields Collapser] Incompatible with ACF Pro 5.2.7](https://wordpress.org/support/topic/incompatible-with-acf-pro-527/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/incompatible-with-acf-pro-527/#post-6259615)
 * Do you add that filter to the functions.php file? I’ve just tried adding that
   and it doesn’t seem to do anything?!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Child pages not displaying correctly in sidebar](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/#post-6201534)
 * Just wondering if anybody has any other advice?
 * I have tried everything with this including using the default wordpress theme
   and disabling all plugins. Still all I get is all pages displaying in the sidebar
   when I use the above code but when I add the code directly to the theme template
   then all works well.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Congratulations!](https://wordpress.org/support/topic/congratulations-22/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/congratulations-22/#post-6221348)
 * Appears to have been resolved in v2.2.1
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Child pages not displaying correctly in sidebar](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/#post-6201365)
 * I’ve even added this
 *     ```
       <?php the_ID(); ?>
       ```
   
 * in another widget, just to make sure it was getting the page id – it is.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Child pages not displaying correctly in sidebar](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/child-pages-not-working-in-sidebar/#post-6201364)
 * Thanks for replying. Unfortunately I’ve tried everything I can think of i.e, 
   reverting to the standard WP theme, deactivate all plugins, remove all functions
   from the functions.php file, have the most basic page with no query on there 
   but it just doesn’t work. Pulling my hair out here trying to figure out what 
   difference it could possibly make by having it as a widget (not working) compared
   to including the code in the same div as the widgets appear.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Image Sizes] Regenerate Thumbnails doesn't work](https://wordpress.org/support/topic/regenerate-thumbnails-doesnt-work/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/regenerate-thumbnails-doesnt-work/#post-6104233)
 * Unfortunately 3.0.6. only fixed the regenerate thumbnails when accessing it from
   Settings > Media and not when you are attempting to regenerate single images 
   from the Media library.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Query using custom field for event date not working](https://wordpress.org/support/topic/query-using-custom-field-for-event-date-not-working/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/query-using-custom-field-for-event-date-not-working/page/2/#post-5092370)
 * I’m not trying to limit each subgroup to 8. I am trying to limit all upcoming
   events to 8.
 * I’ve tried ‘numberposts’ and ‘posts_per_page’ but neither work when limiting 
   the amount of posts to a set number i.e. 8
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Query using custom field for event date not working](https://wordpress.org/support/topic/query-using-custom-field-for-event-date-not-working/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/query-using-custom-field-for-event-date-not-working/#post-5092367)
 * Sorry for the delay in replying. Here’s the code with the infinite amount of 
   posts showing (-1) but if I change that to 8, for example, then no posts show.
 *     ```
       <div class="related-posts p-list cf">
   
       <?php
       // Get the posts
       $myposts = get_posts( array(
       	'post_type' => 'event',
       	'meta_key' => 'event_date_start',
       	'orderby' => 'meta_value_num',
       	'order' => 'ASC',
       	'posts_per_page' => '-1',
       	'post__not_in' => array($post->ID),
       ));
        ?>
       <?php foreach ( $myposts as $post ) : setup_postdata( $post );
   
       $eventdate = get_post_meta($post->ID,'event_date_start',true);
       $eventdateend = get_post_meta($post->ID,'event_date_end',true);
       $eventnumdays = get_post_meta($post->ID,'event_number_of_days',true);
   
       $today = current_time('timestamp');
          if( get_field('event_number_of_days') ) {
                 $exp_date = strtotime(get_post_meta($post->ID,'event_date_end',true) . ' 23:59:59');
          } else {
                 $exp_date = strtotime(get_post_meta($post->ID,'event_date_start',true) . ' 23:59:59');
          }
       if ($today <= $exp_date) {
   
       $eventdatestart = strtotime(get_post_meta($post->ID,'event_date_start',true));
             $startdate = date('d', $eventdatestart);
             $startmonth = date('F', $eventdatestart);
             $startyear = date('Y', $eventdatestart);
       ?>
       <div class="block">
       <a href="<?php the_permalink() ?>" title="<?php the_title() ?>">
       <div class="image">
       <div class="meta-date">
       <div class="date"><?php echo $startdate; ?> <?php echo $startmonth; ?></div>
       </div>
       <?php the_post_thumbnail('medium', array('class' => 'medium')); ?>
       </div>
       <div class="details">
       <h2 class="title"><?php the_title() ?></h2>
       <?php the_excerpt(); ?>
       </div>
       </a>
       </div>
       <?php } endforeach; wp_reset_postdata();?>
       <?php wp_reset_query(); ?>
   
       </div>
       ```
   

Viewing 15 replies - 166 through 180 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/page/11/?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)…
[11](https://wordpress.org/support/users/greencode/replies/page/11/?output_format=md)
12 [13](https://wordpress.org/support/users/greencode/replies/page/13/?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/13/?output_format=md)