Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #470705

    Hello,

    for a new web page, we want to include a blog section on the homepage. Due to SEO reasons, the blog titles shall be H3.
    We found out, that this could only be done with a child theme.

    As this could/would cause efforts when updating the theme: Isn’t there a standard way to mark up blog titles on the homepage as H3 ?

    Thanks a lot

    Jochen

    #471010

    Hey Jochen!

    Try adding this to your child theme functions.php file.

    if(!function_exists('avia_default_title_filter'))
    {
    	function avia_default_title_filter($current_post)
    	{
    		if(!empty($current_post['title']))
    		{
    			$heading = is_singular() ? "h1" : "h2";
    	
    			$output  = "";
    			//$output .= "<{$heading} class='post-title entry-title ". avia_offset_class('meta', false). "'>";
    			$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;
    	}
    }

    You can try changing the H2 there to H3.

    Cheers!
    Elliott

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