Hi dear @ecartz ;ecartz wrote: ↑Thu May 26, 2022 7:44 amIn get_title, tryradhavallabh wrote: ↑Thu May 26, 2022 6:41 am On the set_title function I get as below for print_r(get_defined_vars())-
Array ( [title] => Radha Krishna Spiritual Store )
On the get_title function it returns empty when I use get_defined_vars()
I get as below when I try to echo and get_defined_vars() for $title in the same get_title function.
Array ( [title] => )orCode: Select all
echo "get_title[{$this->_title}]";orCode: Select all
error_log($this->_title);Code: Select all
print_r($this);
As per your instructions I tried as below-
public function get_title() {
echo "get_title[{$this->_title}]";
return $this->_title;
}
It returns- get_title[]
I tried as below-
public function get_title() {
error_log($this->_title);
return $this->_title;
}
It returns empty.
I tried as below-
public function get_title() {
print_r($this);
return $this->_title;
}
Template Object ( [_title:protected] => [_blocks:protected] => Array ([footer_scripts] =>.........(displays all footer scripts)
I tried as below-
public function get_title() {
return $this->_title;
print_r($this);
echo "get_title[{$this->_title}]";
error_log($this->_title);
}
But there is no output on the front end via print or echo ....and it has no output in the php error log too dear.
Please help and guide me further more dear that what I shall do...
Thank you very much in advance;
Very Warm Regds./
radhavallabh