choubey
Forum Replies Created
-
Hi Macken,
This is fine if we leave default, since Hueman home uses H2, H3 tags to display post cards. So SEO tool said website does not contain H1 tags. If we change <h2><?php echo hu_blog_title(); ?></h2> to H1 it will just change the span.
I checked by doing analysis on SEO tools for single post URL and it contains H1 tags and hence no issue.
Your suggestion of adding itemprop=”headline” is good for crawlers to easily crawl.
My page-title.php code is as below after your suggested modification. But the “headline” property is not populated.
<?php if ( ! hu_is_home_empty() ) : ?>
<div class=”page-title pad group”>
<?php //prints the relevant metas (cat, tag, author, date, …) for a given context : home, single post, page, 404, search, archive… ?>
<?php if ( is_home() && hu_is_checked(‘blog-heading-enabled’) ) : ?>
<h2><?php echo hu_blog_title(); ?></h2>
<?php elseif ( is_single() ): ?>
<ul class=”meta-single group”>
<li class=”category”><?php the_category(‘ <span>/</span> ‘); ?>
<?php if ( comments_open() && ( hu_is_checked( ‘comment-count’ ) ) ): ?>
<li class=”comments”>“><i class=”far fa-comments”></i><?php comments_number( ‘0’, ‘1’, ‘%’ ); ?>
<?php endif; ?><?php elseif ( is_page() ): ?>
<h1 itemprop=”headline”><?php echo hu_get_page_title(); ?></h1>
<?php elseif ( is_search() ): ?>
<h1 itemprop=”headline”><?php echo hu_get_search_title(); ?></h1>
<?php elseif ( is_404() ): ?>
<h1 itemprop=”headline”><?php echo hu_get_404_title(); ?></h1>
<?php elseif ( is_author() ): ?>
<h1 itemprop=”headline”><?php echo hu_get_author_title(); ?></h1>
<?php elseif ( is_category() || is_tag() ): ?>
<h1 itemprop=”headline”><?php echo hu_get_term_page_title(); ?></h1>
<?php elseif ( is_day() || is_month() || is_year() ) : ?>
<h1 itemprop=”headline”><?php echo hu_get_date_archive_title(); ?></h1>
<?php else: ?>
<?php if ( ! is_home() && ! hu_is_checked(‘blog-heading-enabled’) ) : ?>
<h2><?php the_title(); ?></h2>
<?php endif; ?><?php endif; ?>
</div><!–/.page-title–>
<?php endif; ?>Hi Macken,
Thanks for your reply.
I did the changes but still same. I am using caching plugin and cleared caches too.I am wondering that why SEO tools saying H1 tag not there and they are saying that my title is in H2 tag.
Is it happening to Google crawler also ? As I can see H1 tags in inspect but still not sure what’s wrong.
Please suggest.
Thank You.
Hi, The TincyMCE removes the code and you can use custom fields to display code.
If you are using the Hueman theme please see this topic:
https://wordpress.org/support/topic/stop-theme-pre-tag-beautify-and-use-prism-to-beautify-snippets/Hi Emran,
Thanks for your reply.
I have found one alternate way to work with it. I am using child theme but I am not sure how to override these values so I just commented the pre tag formatting in parent theme and prism highlighter worked. The code is commented in style.css and style.min.css. If you have any idea how to override these values please suggest me. The code is :
.comment code, .entry code, .entry pre {
font-family: Monaco, “Courier New”, “DejaVu Sans Mono”, “Bitstream Vera Sans Mono”, monospace;
font-size: 0.6875em;
}.entry pre {
background: url(../img/pre.png) repeat top;
padding: 18px 20px;
margin: 30px 0;
border: 1px solid #ddd;
line-height: 19px;
white-space: pre-wrap;
word-wrap: break-word;
overflow-x: auto;
overflow-y: hidden;
}.comment code, .entry code {
background: #eee;
padding: 0 3px;
}Thanks.