Dynamically Override Fancy Title

The original function ends with this line:

return apply_filters( 'presscore_get_page_title', $title );

That’s your cue. You can build a filter that completely overrules the $title generated by that function. Like this:

add_filter ('presscore_get_page_title','wpse263380_presscore_get_page_title',10,1);
function wpse263380_presscore_get_page_title ( $title ) {
  $title="My awesome title";
  return $title;
  }

Leave a Comment