How to create URL parameters to run custom queries?

What you want to do is access the query_vars and use them. Base code: Page to access the fields $custom_field = get_query_var(‘custom_field’); var_dump($custom_field); And the function or custom plugin to save the magic: add_filter( ‘query_vars’, ‘my_custom_query_vars’ ); function my_custom_query_vars( $vars ) { $vars[] = ‘custom_field’; $vars[] = ‘custom_awesome_field’; return $vars; } yourawesomesite.awesome/?custom_field=white string ‘white’ (length=5)

Custom fields with wordpress

You can try the date() function: $date = get_post_meta($post->ID, ‘event_start_date’, true); $day = date(‘d’, strtotime($date)); //01-31 Another way will be DateTime: $date = get_post_meta($post->ID, ‘event_start_date’, true); $date = DateTime::createFromFormat(‘Y-m-d’, $date); $day = $date->format(‘d’);