I have the following code:
$sortable = false;
'post_type' => 'tour',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_query' => array(
array(
$query = array(
'key' => 'rezdy_tour_type',
'value' => 'DAYTOUR'
)
)
);
I would love to add a specific script if my rezdy_tour_type == DAYTOUR, so I've tried:
<?php
global $post;
if(get_post_meta($tour->ID, 'rezdy_tour_type', true) == 'DAYTOUR') { ?>
mycustomscript
<?php
}
else { ?>
<?php
}
?>
however I am not able to create the script. Some inside help would be truly appreciated, thank you