I am having a new issue that popped out of nowhere, or at least has not been detected until now. Wordpress or PHP upgrades have happened so I am assuming it's a compatibility issue since it used to work.
Errors listed on debug:
Notice: Undefined index: post in functions.php on line 163
Notice: Undefined index: post_ID in functions.php on line 163
Notice: Undefined index: post_type in functions.php on line 164
Notice: Undefined index: page in single-location.php on line 9
Here are the referenced lines in my functions.php file.
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
$post_type = $_GET['post_type'] ? $_GET['post_type'] :get_post_type($post_id);
And here is the referenced line in my single-location.php file:
// single location template
$this_page = $_GET['page'];
I have a website that uses has multiple locations of restaurants and the website has different locations and different data for each location.
I have tried to modify the code using other posts and solutions but UI am unsuccessful in my many attempts.
Any help or guidance is GREATLY appreciated.