How to fix h3 to h2. And keep h4 in title of post.

Posted in: Newspaper
Post count: 4

Hello I see all title of Newspaper theme is H3. And this class is: entry-title td-module-title
I was try fix h3 to h2 in td_module.php with replace code:

function get_title($cut_at = '') {
$buffy = '';
$buffy .= '<h2 class="entry-title td-module-title">';
$buffy .='href . '">';

//see if we have to cut the title and if we have the title lenght in the panel for ex: td_module_6__title_excerpt
if ($cut_at != '') {
//cut at the hard coded size
$buffy .= td_util::excerpt($this->title, $cut_at, 'show_shortcodes');

} else {
$current_module_class = get_class($this);

//see if we have a default setting for this module, and if so only apply it if we don't get other things form theme panel.
if (td_api_module::_helper_check_excerpt_title($current_module_class)) {
$db_title_excerpt = td_util::get_option($current_module_class . '_title_excerpt');
if ($db_title_excerpt != '') {
//cut from the database settings
$buffy .= td_util::excerpt($this->title, $db_title_excerpt, 'show_shortcodes');
} else {
//cut at the default size
$module_api = td_api_module::get_by_id($current_module_class);
$buffy .= td_util::excerpt($this->title, $module_api['excerpt_title'], 'show_shortcodes');
}
} else {
/**
* no $cut_at provided and no setting in td_config -> return the full title
* @see td_global::$modules_list
*/
$buffy .= $this->title;
}

}
$buffy .='
';
$buffy .= '</h2>';
return $buffy;
}

But when I replace like this all title have class entry-title td-module-title is was change from h3 to h2. So If I only change that in homepage, category but not change in Post (I think it good for SEO) I want in Post it will h4 or <span>
Can you help me do that? I very need that.
In picture I need fix, it will not h4 to good for SEO, not h2 like this.
https://imgur.com/a/7jVRhx6

Post count: 4

Anyone can support for me? I think this is big error of theme newspaper and it not fix in a long time. It will not good for SEO. I read a lot of question on your site and Newspaper talk will update it soon, but I think noone update it! Please read topic and try fix that because your theme not have h2 and not good for SEO

Post count: 20688

Hi,

The article titles in all modules will be h3, that is how they are defined in the theme code. Block titles are h4 and post titles are h3.

If you want to change the h3 in h2 you will have to make the modification in this theme file
http://www.screencast.com/t/BJwFFY2YLV
Once you modify there all modules will be affected.

Thanks

Post count: 4

Hello I was change that! But I only want that change in category and homepage. I don’t want it change in post. How to do that sir? When do like with you all title is will h2. I only it h2 in category and homepage, in Post it will be h4! Can you guide for me how to do that?

Post count: 20688

The modification will affect the whole website and all the modules. The same function is used for all of them. The theme modules do not have settings for what you are trying to do unfortunately.
Sorry for any inconvenience.

Post count: 4

OK thanks you so much! I will try with different way! All best with you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.