Hello,
I wanted to know how I would go about changing title tags/header text from H2 to H1?
Thank you,
-Sam
Hey sbukofsky1,
I assume you want to change the post headlines from h2 to h1. You can use this code to replace the h2 tags with h1 tags – just add this code to your child theme functions.php file:
add_filter( 'post-format-standard', 'avia_default_title_filter_for_h1', 15, 1 );
function avia_default_title_filter_for_h1($current_post)
{
if(!empty($current_post['title']))
{
$heading = "h1";
$output = "";
$output .= "<{$heading} class='post-title entry-title' ".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).">";
$output .= " <a href='".get_permalink()."' rel='bookmark' title='". __('Permanent Link:','avia_framework')." ".$current_post['title']."'>".$current_post['title'];
$output .= " <span class='post-format-icon minor-meta'></span>";
$output .= " </a>";
$output .= "</{$heading}>";
$current_post['title'] = $output;
}
return $current_post;
}
Best regards,
Dude
Great, I will give this a shot. Thank you!
-Sam
Hi,
Great, I’ll leave this thread open for now :)
Best regards,
Dude