Replace or delete pretext h1 entry article title

//replace or delete pretext h1 entry article title
function the_title_trim($title)
{
  $pattern[0] = '/Protected:/';
  $pattern[1] = '/Private:/';
  $pattern[2] = '/Beveiligd:/';
  $replacement[0] = ''; // Enter some text to put in place of Protected:
  $replacement[1] = ''; // Enter some text to put in place of Private:
  $replacement[2] = ''; // Enter some text to put in place of Beveiligd:

  return preg_replace($pattern, $replacement, $title);
}
add_filter('the_title', 'the_title_trim');

Leave a Reply