Category : wordpress

Fallowing this article. I am trying to make the same thing but limited to single category only called vip-betta-fish. add_shortcode( ‘sold_products’, ‘wc_products_allsold’ ); function wc_products_allsold() { $categories = array(‘vip-betta-fish’); // Get last week orders $all_orders = wc_get_orders( array( ‘limit’ => -1, ‘status’ => array_map( ‘wc_get_order_status_name’, wc_get_is_paid_statuses() ), ‘return’ => ‘ids’, ) ); // Sum quantities ..

Read more

I have a custom table and that custom table data need to be displayed in single-{{cPT}}.php But the issue is my template file only renders the admin login only it not rendering without login and the permalink getting for this custom table row is post_type=student_questions&p=147. I reffered this URL Create a single.php template for custom ..

Read more