badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

H1 and H2 is forced to be the same?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #50845
    happyeungin
    Participant

    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 –>

    #50855

    Hi happyeungin,
    Go to Dashboard -> Appearance -> Customize -> Additional Css and add below css

    .single #main .entry-title {
        display: none;
    }

    Thank you

    #50870
    happyeungin
    Participant

    In 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.

    #50906

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

    #50921
    happyeungin
    Participant

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

    #50924
    happyeungin
    Participant

    I 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.

    #50952

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

    #51037
    happyeungin
    Participant

    Yes, it works perfectly, VERY GOOD

    #51039

    You welcome happyeungin

    Thank you

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.