I am trying to make a shortcode to only output some text on the home page (and the shortcode is in custom site settings footer html code)
I have just realised writing this that the shortcode context is customsitesettings and not the page_controller context where I had it, but this still leaves me with a small problem if finding the current page and whether its parentid is 0 (home page).
So this was my junk page_controller code:
public function About($args){
if ($this->getParentID()== 0 && isset($args['id'])){
$about = '<a data-reveal-id="'.$args['id'].'">About</a> | ';
return $about;
}
}
How do I get the page object in the customsitesettings context? I'm feeling a bit thick here!