2016-10-18, 17:21:17
(2016-10-18, 16:24:28)morvy Wrote: I tried to use index-pretemplate, content-top hooks but nothing changed, content filter works fine for displaying data in page content, but there is no filter for titles in 3.3
I tried to use following and both seems to work well:
Code:
add_action('index-pretemplate', '__change_page_data');
function __change_data() {
global $title;
$title = 'My Title';
}
Code:
add_filter('data_index', '__change_page_data');
function __change_page_data() {
global $data_index;
$data_index->title = 'My Title';
$data_index->content = 'Here's my content';
return $data_index;
}