<?php
if (!defined('ABSPATH')) {
    exit;
}
$templates = new Chama_Template_Loader;
$slug = get_query_var( 'slug' );
if($slug){
    $campaign_args = array(
        'name'           => $slug,
        'post_type' => 'chama_campaign',
        'post_status' => 'publish',
        'posts_per_page' => 1
    );
    $campaign = new WP_Query($campaign_args);
      if ($campaign->have_posts()):

        while ($campaign->have_posts()): $campaign->the_post();
            set_query_var('show_share', true);
            $templates->get_template_part('content', 'campaigncard');
            $templates->get_template_part('content', 'campaigntabs');
        endwhile;
        $campaign = null;
        wp_reset_postdata();
    endif;

}





