- This topic has 8 replies, 2 voices, and was last updated 7 years, 7 months ago by Theme Horse Support Team.
-
AuthorPosts
-
April 11, 2017 at 7:52 am #50845happyeunginParticipant
I notice from the code: (see the bold) that H1 and H2 are forced to be the same as the title of each post. Is there solution for this?
<h1 class=”page-title”>Orijen Adult 好唔好? 高肉量低碳水神物</h1><!– .page-title –>
/div><!– .container –>
</div><!– .page-title-wrap –>
</header><!– #masthead –>
<div id=”content”>
<div class=”container clearfix”> <div id=”primary”>
<div id=”main”> <div id=”post-76 clearfix” class=”clearfix post-76 post type-post status-publish format-standard has-post-thumbnail hentry category-4 category-2 tag-orijen”>
<div class=”post-featured-content”>
<article>
<header class=”entry-header”>
<div class=”entry-meta”>
<span class=”cat-links”>
5星級 狗糧食評 </span>
</div><!– .entry-meta –>
<h2 class=”entry-title”>
Orijen Adult 好唔好? 高肉量低碳水神物
</h2><!– .entry-title –>April 11, 2017 at 11:20 am #50855Theme Horse Support TeamKeymasterHi happyeungin,
Go to Dashboard -> Appearance -> Customize -> Additional Css and add below css.single #main .entry-title { display: none; }
Thank you
April 12, 2017 at 2:52 am #50870happyeunginParticipantIn your way , it does actually hide the H2 title in the blog post.
However, in the code <h2 class=”entry-title”>
Orijen Adult 好唔好? 高肉量低碳水神物 </h2><!– .entry-title –>is still here.
The reason I point out this is because H1 and H2 has it own SEO purposes and the two being the same is not good for it.
Is there any way to show it but not as a H2?
Thank you very much.
April 13, 2017 at 10:23 am #50906Theme Horse Support TeamKeymasterHi happyeungin,
To remove you have to customize a code. Go to theme folder -> inc -> structure -> content-extension.php on line no 285-287 and remove below code
<h2 class="entry-title"> <?php the_title(); ?> </h2><!-- .entry-title -->
We recommended you not to change the code. But if you change the code then while updating to new version all your customised code will be lost. So create a child theme before customizing any code in the theme or each and every time you update to new version simply go to that line and remove it from code.
Thank you.April 14, 2017 at 3:45 pm #50921happyeunginParticipantHello Support team,
I tried this. It works but looks really weird with nothing between on the category date/author.
Is there any way to to keep the h2 title but not the same as the h1?
like a way for me to control the h2 title?
April 15, 2017 at 4:54 am #50924happyeunginParticipantI tried it out. The h1 title is related to other functions as well so it will get complicated if it gets changed.
Thanks for the support.
April 17, 2017 at 5:55 am #50952Theme Horse Support TeamKeymasterHi happyeungin,
If you like to keep h2 tag and remove the h1 tag then there needs a bit code customization. Go to theme folder -> inc -> structure -> header-extension.php on line no 216 to 227 remove that code and add this below code
<?php if (!is_single){ ?> <div class="page-title-wrap" <?php if ( $magcast_sitetitle_img_setting != '1' && $magcast_sitetitle_image != '' ){ ?> style="background-image:url('<?php echo esc_url($magcast_sitetitle_image);?>');" <?php } ?> > <div class="container clearfix"> <?php if(is_home()){?> <h2 class="page-title"><?php echo magcast_header_title();?></h2><!-- .page-title --> <?php } else { ?> <h1 class="page-title"><?php echo magcast_header_title();?></h1><!-- .page-title --> <?php } if (function_exists('magcast_breadcrumb')) { magcast_breadcrumb(); } ?> </div><!-- .container --> </div><!-- .page-title-wrap --> <?php } ?>
This may help you.
April 21, 2017 at 9:33 am #51037happyeunginParticipantYes, it works perfectly, VERY GOOD
April 21, 2017 at 10:24 am #51039Theme Horse Support TeamKeymasterYou welcome happyeungin
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.