Title: dalemoore's Replies | WordPress.org

---

# dalemoore

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Add custom field to “customer details” block in order email](https://wordpress.org/support/topic/add-custom-field-to-customer-details-block-in-order-email/)
 *  [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/add-custom-field-to-customer-details-block-in-order-email/#post-8886166)
 * This worked for me (with my own fields listed) based on your response. The key
   has to match what’s in your custom field, so it’s not the name with underscores(
   first_time_member as one of my examples). If you include special characters in
   the key, like a quotation mark, be sure to escape it.
 *     ```
       /**
        * Add custom fields to emails
        */
       add_filter('woocommerce_email_customer_details_fields', 'my_checkout_field_order_meta_fields', 40, 3 );
       function my_checkout_field_order_meta_fields( $fields, $sent_to_admin, $order ) {
         $fields['first_time_member'] = array(
           'label' => __( 'First Time Member?' ),
           'value' => get_post_meta( $order->id, 'First Time Member?', true ),
         );
         $fields['spouse_name'] = array(
           'label' => __( 'Spouse Name' ),
           'value' => get_post_meta( $order->id, 'Spouse Name', true ),
         );
         $fields['childrens_ages'] = array(
           'label' => __( 'Children\'s Ages' ),
           'value' => get_post_meta( $order->id, 'Children\'s Ages', true ),
         );
         return $fields;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] reCAPTCHA Breaks the Form](https://wordpress.org/support/topic/recaptcha-breaks-the-form/)
 *  [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/recaptcha-breaks-the-form/#post-7588727)
 * It looks like Google changed reCAPTCHA.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to view posts from a specific year through URL (?year=2016)?](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years ago](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/#post-7273463)
 * I was never able to solve this using just pre_get_posts, but I was using a new
   query. Thanks. I’ll have to study more on using pre_get_posts for the future.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to view posts from a specific year through URL (?year=2016)?](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years ago](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/#post-7273235)
 * According to [https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Page_Requests](https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Page_Requests):
 * > Similarly, pre_get_posts will not work if used in template files (e.g., archive.
   > php), since they are called after the query has been completed.
 * I’m not using the pre_get_posts in archive-plant.php, but in functions.php, but
   I wonder if this is why it’s not working… Guess I’ll keep digging.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to view posts from a specific year through URL (?year=2016)?](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years ago](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/#post-7273232)
 * Okay, I tried using pre_get_posts to alter the query and it doesn’t seem to work
   unless I create a new WP_Query. None of the manipulations that I add into functions.
   php seem to work on the default query. I guess I just don’t understand what “
   the main query” is/means. It seems to be related to the default “post” post type,
   not my custom post type of “plant” created through Custom Post Type UI.
 * This is what I have in functions.php:
 *     ```
       function change_plants_query( $query ) {
   
         if ( !is_admin() && is_post_type_archive('plant') ) { // trying to affect what appears on archive-plant.php, without affecting the admin area... if I don't have archive-plant.php in the theme folder, I can't control the post layout to be a table
           // Display 10 posts for a custom post type called 'plant'
           //$query->set( 'post_type', array( 'plant' ) );
           $query->set( 'posts_per_page', 10 );
         }
       }
       add_action( 'pre_get_posts', 'change_plants_query', 1 );
       ```
   
 * In my archive-plant.php template page, I have this for The Loop:
 *     ```
       // The Loop Arguments
       $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
       $args = array(
           'post_type' => array('plant'), // display only Plants; otherwise, every post type is shown
           'orderby' => $order_by,
           'order' => $order,
           'posts_per_page' => $posts_per_page,
           'paged' => $paged,
           'year' => $year,
           //'meta_key' => 'plant_rating_values',
           //'meta_value' => 2,
       );
   
       // The Loop
       $loop = new WP_Query( $args );
       //if ( have_posts() ) : // this one is the default
       if ( $loop->have_posts() ) : // this one is the custom new query
       ```
   
 * Further down, I have:
 *     ```
       //while ( have_posts() ) : the_post(); // this one is the default
       while ( $loop->have_posts() ) : $loop->the_post(); // this one is the custom new query
       ```
   
 * If I use the ones with $loop->, my changes in pre_get_posts seem to take effect.
   If I use the “default” loop, they don’t. So, how can I do this without creating
   a new WP_Query?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to view posts from a specific year through URL (?year=2016)?](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-view-posts-from-a-specific-year-through-url-year2016/#post-7273180)
 * Thanks for the tips bcworkz, I’ll check this out when I’m back at the office 
   tomorrow and update.
 * A bit more information that I remember off the top of my head:
    – This code is
   in archive-plant.php. So you’re saying that I don’t even need to use a new query
   for this? How would I then manipulate the query using the select options, through
   pre_get_posts? I believe you have to then add your manipulations in functions.
   php? Maybe that’s why the year isn’t working.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to filter custom posts by date through the URL?](https://wordpress.org/support/topic/how-to-filter-custom-posts-by-date-through-the-url/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-filter-custom-posts-by-date-through-the-url/#post-7273178)
 * Sorry about that, when I submitted the form it went to a blank screen, so I posted
   again. When I went to this forum the second post still didn’t show.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Multisite Admin area missing styling?](https://wordpress.org/support/topic/multisite-admin-area-missing-styling/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multisite-admin-area-missing-styling/#post-6128412)
 * Still having this issue.
 * Deleted all files in the WordPress root except wp-config.php, also deleted all
   of wp-admin and wp-includes, and re-uploaded them from a clean WP install (actually
   zipped it up and uploaded through the NetSol file manager and unzipped on the
   server!).
 * Went and bought an el cheap 99cent domain from 1and1 to use as the main domain
   so it’s no longer hosted in a subdomain, but that didn’t help. Followed the steps
   on Moving WordPress Multisite on the Codex and all is well with that, but, still
   the freezing on multisite subsites. The error I get in the dev console in Chrome
   is:
 * `GET http://mynewdomain.com/tourism/wp-admin/themes.php net::ERR_CONNECTION_RESET`
   (
   that path is just an example, it happens all over the admin area) I can usually
   access things for a minute or two before freezing, and I do get styles now (mostly),
   but, it freezes the browser.
 * – Tried deactivating all plugins, including renaming the plugins folder entirely
   –
   Tried reverting to Twentyfifteen theme
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Made Easy] What happened to the shortcodes list?](https://wordpress.org/support/topic/what-happened-to-the-shortcodes-list/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years ago](https://wordpress.org/support/topic/what-happened-to-the-shortcodes-list/#post-6071022)
 * Ahhh. I didn’t notice that was a dropdown, and the site has changed since I last
   visited. Long day…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Really Simple CSV Importer] Importing CSV overwrites CFS File Upload Field](https://wordpress.org/support/topic/importing-csv-overwrites-cfs-file-upload-field/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years ago](https://wordpress.org/support/topic/importing-csv-overwrites-cfs-file-upload-field/#post-6051892)
 * Easiest solution was, indeed, to just create an entire new loop – all I had to
   do was separate the image out into a new loop and change the CFS->get part. I’m
   guessing that it would have required way more confusing logic otherwise.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Really Simple CSV Importer] Check for a valid post status](https://wordpress.org/support/topic/check-for-a-valid-post-status/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years ago](https://wordpress.org/support/topic/check-for-a-valid-post-status/#post-6036334)
 * Great, thanks!
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Can't login under Multisite subsites (redirect issue?)](https://wordpress.org/support/topic/cant-login-under-multisite-subsites-redirect-issue/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cant-login-under-multisite-subsites-redirect-issue/#post-5990124)
 * Yep, that plugin was it! I just needed to check “Force SSL Admin” in the HTTPS
   settings. Resolved.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Can't login under Multisite subsites (redirect issue?)](https://wordpress.org/support/topic/cant-login-under-multisite-subsites-redirect-issue/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cant-login-under-multisite-subsites-redirect-issue/#post-5990118)
 * I should also mention that we have the WordPress HTTPS Plugin activated. I just
   discovered that disabling that plugin allows one to access the login through 
   [http://blogs.domain.com/site/wp-login.php](http://blogs.domain.com/site/wp-login.php)….
   so I guess it’s an issue with that plugin.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can you tell who has activated/deactivated a plugin?](https://wordpress.org/support/topic/can-you-tell-who-has-activateddeactivated-a-plugin/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/can-you-tell-who-has-activateddeactivated-a-plugin/#post-5946524)
 * Thanks, I will try that one or look for other security-themed plugins. I was 
   just curious if there was out of the box functionality.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Field Suite] How do you get the post thumbnail for a relationship item?](https://wordpress.org/support/topic/how-do-you-get-the-post-thumbnail-for-a-relationship-item/)
 *  Thread Starter [dalemoore](https://wordpress.org/support/users/dalemoore/)
 * (@dalemoore)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/how-do-you-get-the-post-thumbnail-for-a-relationship-item/#post-5905882)
 * Thanks.

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

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