$postID = $post->ID;
$parentID = $post->post_parent;
$parentParentID = get_post_ancestors($parentID);
$parentParentID = $parentParentID[0] ?? null;
$parentParentIDParent = get_post_ancestors($parentParentID);
$parentParentIDParent = $parentParentIDParent[0] ?? null;
$hide_sidebar = false;
if ( cms_is_in_menu('Sidebar - About') )
{
$sidebar_menu = 'Sidebar - About';
}
if ( cms_is_in_menu('Sidebar - Resources') )
{
$sidebar_menu = 'Sidebar - Resources';
}
if ( cms_is_in_menu('Sidebar - Treatments') )
{
$sidebar_menu = 'Sidebar - Treatments';
}
if ( cms_is_in_menu('Sidebar - Contact') )
{
$sidebar_menu = 'Sidebar - Contact';
}
if (is_404()) {
$headerTitle = '404';
$sidebar_menu = 'Sidebar - About';
}
if ( is_single() || is_archive() || is_home())
{
$category = single_cat_title("",false);
// if(!empty($category)){ $categoryTitle = ' - ' . $category; }
$headerTitle = 'Blog';
$blogArea = true;
$postID = get_option('page_for_posts');
}
if ( get_post_type() == 'image-gallery' ) {
$headerTitle = 'Image Gallery';
}
if ( get_post_type() == 'videos' ) {
$headerTitle = 'Video Gallery';
}
if ( get_post_type() == 'patient-stories' ) {
$headerTitle = 'Patient Stories';
}
// $menus = wp_get_nav_menus();
// foreach($menus as $menu){
// $menu_object = wp_get_nav_menu_items( esc_attr( $menu->name ) );
// print_r($menu_object);
// // echo $menu->name;
// }
$postID = $post->ID;
$parentID = $post->post_parent;
$parentParentID = get_post_ancestors($parentID);
$parentParentID = $parentParentID[0] ?? null;
$parentParentIDParent = get_post_ancestors($parentParentID);
$parentParentIDParent = $parentParentIDParent[0] ?? null;
$hide_sidebar = false;
if ( cms_is_in_menu('Sidebar - About') )
{
$sidebar_menu = 'Sidebar - About';
}
if ( cms_is_in_menu('Sidebar - Resources') )
{
$sidebar_menu = 'Sidebar - Resources';
}
if ( cms_is_in_menu('Sidebar - Treatments') )
{
$sidebar_menu = 'Sidebar - Treatments';
}
if ( cms_is_in_menu('Sidebar - Contact') )
{
$sidebar_menu = 'Sidebar - Contact';
}
if (is_404()) {
$headerTitle = '404';
$sidebar_menu = 'Sidebar - About';
}
if ( is_single() || is_archive() || is_home())
{
$category = single_cat_title("",false);
// if(!empty($category)){ $categoryTitle = ' - ' . $category; }
$headerTitle = 'Blog';
$blogArea = true;
$postID = get_option('page_for_posts');
}
if ( get_post_type() == 'image-gallery' ) {
$headerTitle = 'Image Gallery';
}
if ( get_post_type() == 'videos' ) {
$headerTitle = 'Video Gallery';
}
if ( get_post_type() == 'patient-stories' ) {
$headerTitle = 'Patient Stories';
}
// $menus = wp_get_nav_menus();
// foreach($menus as $menu){
// $menu_object = wp_get_nav_menu_items( esc_attr( $menu->name ) );
// print_r($menu_object);
// // echo $menu->name;
// }