$img_path = wp_get_upload_dir()['baseurl'] . '/';
global $post, $img_path, $wp_query, $sidebar_visuals, $featured_member, $homepage_sponsors, $sidebar_pic, $default_sidebar_visual, $sidebar_visuals, $interior_page_sidebar_ads;
$current_page_id = $wp_query->get_queried_object_id();
$current_post_categories = get_the_category( $post->ID );
$current_post_category_ids = wp_list_pluck( $current_post_categories, 'cat_ID' );
$current_post_subcat_id = end($current_post_category_ids);
$current_post_type = get_post_type($post);
$current_archive_link = get_post_type_archive_link($current_post_type);
if ($current_post_type != 'post' && $current_post_type != 'page') {
	$current_url = $current_archive_link;
} elseif (get_the_category() != null) {
	$current_url = get_category_link(get_the_category()[0]->term_id);
} else {
	$current_url = get_the_permalink();
}
// Get the array of primary nav item objects.
$menuLocations = get_nav_menu_locations();
$menuID = $menuLocations['primary'];
$primaryNav = wp_get_nav_menu_items($menuID);
if (is_front_page()) {
	$sidebar = 'sidebar_home';
} else {
	$sidebar = 'sidebar_interior';
} ?>