Update main tempalte file to handle template breakdown issue without BuddyPress