Tagged: H1 tag
-
AuthorPosts
-
June 4, 2013 at 2:11 pm #24290
Hi,
It seems that the post titles are not H1 (it shows as #top h2 a). I would like to make the post title to be H1 tags and also to increase the size of the font as the title is much smaller than any H2 you use inside the post content.
Thanks.
June 5, 2013 at 5:29 am #123029Hi,
Open includes > helper-post-format.php, then find this code on line 52:
$heading = is_singular() ? "h1" : "h2";
Replace it with
$heading = is_singular() ? "h1" : "h1";
You can change the font size using this:
.entry-content .post-title {
font-size: 30x;
line-height: 1.5em;
}Add the code on your custom.css or Quick CSS.
Regards,
Ismael
June 5, 2013 at 10:10 am #123030Hi Ismael, Can’t find the line you mentioned in the helper-post-format.php. Line 52 shows:
$output = “”;
//$output .= “<h2 class=’post-title “. avia_offset_class(‘meta’, false). “‘>”;
$output .= “<h2 class=’post-title’>”;
$output .= ” “.$current_post;
$output .= ” <span class=’post-format-icon minor-meta’></span>”;
$output .= ” “;
$output .= “</h2>”;
$current_post = $output;
return $current_post;
Also, how do I access the cusom.css or Quick CSS?
June 6, 2013 at 11:10 am #123031Hi bakbek,
Within that file you can go through and change the instances of h2 to h1 which will change it for all post formats. The custom.css file is in the css folder of the theme files and the Quick CSS is in the Styling tab of the theme options.
Regards,
Devin
June 6, 2013 at 11:37 am #123032Please replace
$output .= "<h2 class='post-title'>";
$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 .= "</h2>";with
$output .= "<h1 class='post-title'>";
$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 .= "</h1>";or (if you don’t want to use h1 headlines on blog & archive pages) use
$headlinetype = is_single() ? 'h1' : 'h2';
$output .= "<$headlinetype class='post-title'>";
$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 .= "</headlinetype>"; -
AuthorPosts
- The topic ‘How to change the Post Title to H1’ is closed to new replies.