Show one post per author and limit query to 8 posts

I want to show 8 recent products from multiple authors on the frontpage. Need to show 1 recent product per author. Currently i’m using basic wp query to show recent 8 products. $args = array ( ‘post_type’ => array( ‘product’ ), ‘posts_per_page’ => ‘8’, ‘order’ => ‘DESC’, ‘orderby’ => ‘date’, ); // The Query $query … Read more

Check if term object is in array

I want to check if a term object is in an get_terms array, but i really can’t figure out how to do it. $subcat_terms = get_terms([ ‘taxonomy’ => ‘product_cat’ ]); $subcat_terms generates an array like this: array (size=3) 0 => object(WP_Term)[10551] public ‘term_id’ => int 16 public ‘name’ => string ‘Hardware’ (length=8) public ‘slug’ => … Read more

Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 5 … Read more

Outputting an array of term meta values in a custom WooCommerce tab?

Forgive me – my WordPress/PHP skills are hilariously rudimentary, so I may not use the correct terminology. I have added a custom tab to the WooCommerce single product page and need it to display a number (sometimes single, sometimes multiple) of term meta values related to a custom taxonomy, ‘book-author’. These values are created in … Read more