Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #987973

    Hello,

    I wanted to know how I would go about changing title tags/header text from H2 to H1?

    Thank you,

    -Sam

    #988004

    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

    #988014

    Great, I will give this a shot. Thank you!

    -Sam

    #988034

    Hi,

    Great, I’ll leave this thread open for now :)

    Best regards,
    Dude

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.