How to allow registration only from a certain location?

The googles suggested several ways to do this, either with PHP or jQuery. Here’s one article I found to get you started: http://tutorialzine.com/2016/06/quick-tip-detecting-your-location-with-javascript/ Plus there is this Stackoverflow answer that might help: https://stackoverflow.com/questions/40636671/how-to-setup-the-functionality-to-get-user-location-in-browser “Geolocation” is a good search term to use. You’ll need to customize you registration form to enable this, but perhaps these links … Read more

Global filter not working

That’s not really how the pre_get_posts works. The original parameters you’ve sent to the function are not good. The only one required is $query. And the workaround for you will be to run your function in the pre_get_posts function to return an array of post_ID corresponding on the variation you want to include, then in … Read more

Cross-sells on WooCommerce product page

Here’s my solution to this. In my situation, the “Related Products” section didn’t make sense (as the store was already organized based on categories), so I removed the standard related products section and re-added it with the same template, but by feeding the template the cross-sells instead of the related products. The section still says … Read more

wp_query beginner

After you create your custom query, you just write The Loop as you would for the default query. So your code would look like this: if ( $query->have_posts() : while ( $query->have_posts() ) : $query->the_post(); // Your Post Stuff Goes Here endwhile; wp_reset_postdata(); else : // No Posts Found Code Goes Here endif; Note the … Read more