Home Page

Reading is set to “A static page” (or WP will
* use it automatically for the latest-posts homepage too, since front-page.php
* takes priority over home.php/index.php).
*/
get_header( ‘dollaroo’ );

$popular_searches = array( ‘PS5’, ‘iPhone 15’, ‘Dyson V15’, ‘OLED TV’, ‘LEGO’, ‘Air Fryer’ ); // edit in Dollaroo Settings later

$hot_deals = new WP_Query( array(
‘post_type’ => ‘dollaroo_deal’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => 8,
‘meta_key’ => ‘_dollaroo_hot_score’,
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘DESC’,
) );

$top_cashback_stores = get_posts( array(
‘post_type’ => ‘dollaroo_store’,
‘posts_per_page’ => 4,
‘meta_key’ => ‘_dollaroo_cashback_rate’,
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘DESC’,
) );

$trending_stores = get_posts( array(
‘post_type’ => ‘dollaroo_store’,
‘posts_per_page’ => 6,
‘meta_key’ => ‘_dollaroo_follower_count’,
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘DESC’,
) );

$categories = get_terms( array( ‘taxonomy’ => ‘dollaroo_category’, ‘hide_empty’ => false, ‘parent’ => 0, ‘number’ => 11 ) );

global $wpdb;
$recent_activity = $wpdb->get_results(
“SELECT user_id, reason, ref_id, created_at FROM {$wpdb->prefix}dollaroo_points_log ORDER BY created_at DESC LIMIT 4”
);
$activity_labels = array(
‘deal_posted’ => ‘posted a hot deal’,
‘review_submitted’ => ‘left a review’,
‘deal_converted_sale’ => ‘earned cashback’,
‘referral’ => ‘referred a friend’,
);
?>