Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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.

    #123029

    Hi,

    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

    #123030

    Hi 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?

    #123031

    Hi 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

    #123032

    Please 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>";

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to change the Post Title to H1’ is closed to new replies.