Generating 3 random numbers and saving them in database

date_default_timezone_set(‘GMT’); $today = date(‘H:i’); for($i=1; $i<=365; $i++) { $repeat = strtotime(“+1 day”,strtotime($today)); $today = date(‘g:i a’,$repeat); } $date1 = date(“1:09 a”); //IMPORTANT: This must be at the top of your page1.html before anything is sent to browser! if($today==$date1){ $random1 = rand(00,99); $random2 = rand(00,99); $random3 = rand(00,99); $randate1 = date(‘Y-m-d’); $link = mysqli_connect(“localhost”, “funlotto”, “5K39S3p2!g”, … Read more

Custom Fields displaying in single line

Probably not the best solution, but why don’t you try the following: while ( have_posts() ) : the_post(); ?> <div><?php $key_name = get_post_custom_values ($key = ‘country’); echo ‘Country : ‘, $key_name[0]; ?> </div> <div><?php $key_name = get_post_custom_values ($key = ‘status’); echo ‘Status : ‘, $key_name[0]; ?> </div>

How can I query and sort custom-post type using WP_Query

You should add arguments to WP_Query to sort by your keys in the order you want. The compare value can be your filter (larger, smaller, etc) $args = [ ‘meta_query’ => array( ‘relation’ => ‘AND’, ‘event_start_date_clause’ => array( ‘key’ => ‘_game_date_key’, ‘compare’ => ‘EXISTS’, ), ‘event_start_time_clause’ => array( ‘key’ => ‘_game_home_goals_key’, ‘compare’ => ‘EXISTS’, ), … Read more