Categories
CMS Mastering Development Wordpress

Custom WP_Query not acknowledging search category & tag at the same time, but work independently

I have elaborate search functionality on one of my sites, it is using a custom WP_Query that will allow for an ‘AND’ & ‘OR’ relation between the users selections. It will then generate the result and overwrite the existing products in the product list. This is all being done using AJAX and a function within […]

Categories
CMS Development Wordpress

WP_Query | Help me create a search term with an ‘OR’ relation?

I have written a very elaborate script that will essentially allow the user to select from categories, tags and of course the search term. Then run these parameters through a WP_Query. I can successfully achieve the results I want using the ‘AND’ relation, this works for when the user populates search parameters into all fields; […]

Categories
CMS Development Wordpress

WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank

I have created a rather complex WP_Query, I need to restrict the arguments that are used within the query dependant on the users inputs. I appreciate I can wrap the whole argument in an IF statement, however if I try add an IF statement within the arguments, it breaks the website claiming there is a […]

Categories
CMS Development Wordpress

WP_Query | Tax_Query Relation | Unable to use ‘OR’ as it then allows all products, help me finish my query?

I began slightly baffled and have slowly degraded to slightly going insane as I am building this wp_query. Admittedly it is a very complex query and there is a lot of additional code that has brought me up to this point so here is the code that is key to helping me resolve to an […]

Categories
CMS Development Wordpress

wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?

I seem to keep going in a loop trying to find an example / answer / resource on this. I have built a custom WooCommerce homepage in /theme-name/woocommerce/archive-product.php where I use this snippet to output products: $display_count = 9; $page = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1; $offset = ( $page – […]

Categories
CMS Development Wordpress

wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?

I seem to keep going in a loop trying to find an example / answer / resource on this. I have built a custom WooCommerce homepage in /theme-name/woocommerce/archive-product.php where I use this snippet to output products: $display_count = 9; $page = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1; $offset = ( $page – […]

Categories
CMS Development Wordpress

wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?

I seem to keep going in a loop trying to find an example / answer / resource on this. I have built a custom WooCommerce homepage in /theme-name/woocommerce/archive-product.php where I use this snippet to output products: $display_count = 9; $page = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1; $offset = ( $page – […]