*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
How to Add H1 Tag in Header
« on: November 03, 2023, 08:46:15 AM »
How to Add H1 Tag - H1 tag is missing error


In which file and where.. .because I tried on Header.php , head.php and main.php , but when I using this <H1>OwnPetz - Free Classified website</H1>  Then its showing on main page... on top or below or in middle.. .when trying with these files..

Can you please tell me how to add H1 tag in header? or best place..

Thanks in Advance.   
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

Re: How to Add H1 Tag in Header
« Reply #1 on: November 04, 2023, 10:37:56 AM »
header.php, for home page you can do exception and place somewhere else if needed, or use logo and wrap it to h1.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #2 on: November 06, 2023, 01:48:28 PM »
Can you please tell me how to wrap logo with H1 tag.
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #3 on: November 06, 2023, 01:49:50 PM »
And I found this..

H1 should be used to describe the page below it, using it on every page to wrap a logo isn't giving you any benefit for accessibility or SEO. It's a waste of a perfectly good (and important) semantic tag.
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #5 on: November 08, 2023, 09:00:48 AM »
Thanks for reply... But as you know I dont know coding...


I found this in header.php

<div class="relative2">
      <div class="left">
        <div class="logo">
          <a href="<?php echo osc_base_url(); ?>"><?php echo del_logo(); ?></a>
        </div>
      </div>


Should I change this code to wrap logo with h1 tag.... And If yes please write for me.. .because in that link code is like :

<h1>
  <a href="http://stackoverflow.com">
    <img src="logo.png" alt="Stack Overflow" />
  </a>
</h1>
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #6 on: January 14, 2024, 08:30:22 AM »
still waiting for reply... please help me to fix this.. Thank you so much in advance.
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #7 on: January 14, 2024, 08:44:07 AM »
I have written this code like this

<div class="relative2">
      <div class="left">
          <h1>
        <div class="logo">
          <a href="<?php echo osc_base_url(); ?>"><?php echo del_logo(); ?></a>
        </div>
        </h1>
      </div>

Is this correct..
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Rick

  • ***
  • 36 posts
Re: How to Add H1 Tag in Header
« Reply #8 on: January 14, 2024, 11:07:17 AM »
Test...


<div class="relative2">
    <div class="left">
        <h1 class="logo">
            <a href="<?php echo osc_base_url(); ?>">
                <?php echo del_logo(); ?>
            </a>
        </h1>
    </div>
</div>

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #9 on: February 08, 2024, 05:11:57 PM »
but this create problem, if we change logo with h1, then on Item and on blog article , its showing Two H1 , but I think only one H1 good for seo.

So H1 is required only on main page .. because H1 is missing only on main page means home page...

So please help me to fix this.

Thanks in Advance.
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

mwindey

  • *****
  • 468 posts
Re: How to Add H1 Tag in Header
« Reply #10 on: February 08, 2024, 07:18:00 PM »
Try this...

Code: [Select]
<div class="relative2">
    <div class="left">
        <a href="<?php echo osc_base_url(); ?>">
            <?php echo del_logo(); ?>
        </a>
    </div>
</div>
<?php if(osc_is_home_page()) : ?>
    <div class="relative2">
        <div class="left">
            <h1 class="logo">
                <a href="<?php echo osc_base_url(); ?>">
                    <?php echo del_logo(); ?>
                </a>
            </h1>
        </div>
    </div>
<?php endif; ?>
« Last Edit: February 08, 2024, 08:09:07 PM by mwindey »

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #11 on: February 23, 2024, 12:15:57 PM »
Please don't suggest any code without testing. I have applied this and see what happened?

Now 2 logo appears here.. 
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #12 on: March 16, 2024, 09:26:17 AM »
If i changed this code -

<div class="relative2">
      <div class="left">
        <div class="logo">
          <a href="<?php echo osc_base_url(); ?>"><?php echo del_logo(); ?></a>
        </div>
      </div>

with this below code its working fine , its showing H1 tag only on home page but little issue, logo showing above line. Check screenshot.


<?php if(osc_is_home_page()) : ?>
    <div class="relative2">
        <div class="left">
            <h1>
                <a href="<?php echo osc_base_url(); ?>">
                    <?php echo del_logo(); ?>
                </a>
            </h1>
        </div>
    </div>
<?php else : ?>
    <div class="relative2">
        <div class="left">
            <a href="<?php echo osc_base_url(); ?>">
                <?php echo del_logo(); ?>
            </a>
        </div>
    </div>
<?php endif; ?>


please tell me how to fix this so that logo will appear between two lines.
« Last Edit: March 16, 2024, 09:28:22 AM by Own Petz »
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

Re: How to Add H1 Tag in Header
« Reply #13 on: March 16, 2024, 01:57:22 PM »
Replace second h1 with h2 and adjust css.
As there is just one h1 visible at same time, shoukd not be an issue
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Own Petz

  • ****
  • 126 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: How to Add H1 Tag in Header
« Reply #14 on: March 16, 2024, 08:53:04 PM »
How to do that??
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com