Home › Forums › Support › Duplicate H1 Tages This topic has 5 replies, 2 voices, and was last updated 3 years, 5 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts November 2, 2020 at 3:55 pm #1515349 David Hi, I would like to eliminate duplicate h1 tag issues by adding page numbers to the blog archive of my website from pages 2 onwards. https://darkstories.com.au/blog/ https://darkstories.com.au/blog/page/2/ https://darkstories.com.au/blog/page/3/ https://darkstories.com.au/blog/page/4/ https://darkstories.com.au/blog/page/5/ The below is the code in use to correctly tag the title as H1 as per the recommended approach. <?php if ( is_home() ) : ?> <h1 class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog</h1> <?php else : ?> <p class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog</p> <?php endif; ?> Would you be able advise if it is possible to add page numbers to the title from pages 2 onwards please? Best Regards David November 3, 2020 at 6:46 am #1516040 DavidStaff Customer Support Hi there, how are you adding the title to the Blog Page ? November 3, 2020 at 12:18 pm #1516720 David Hi David, Via the addition of an element Hook (after main content), displayed on the blog page only, with Execute PHP ticked:- <?php if ( is_home() ) : ?> <h1 class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog</h1> <?php else : ?> <p class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog</p> <?php endif; ?> Regards David November 4, 2020 at 1:28 am #1517258 DavidStaff Customer Support Try this instead: <?php if ( is_paged() ) { // If paginated page output title with current page $current_page = max(1, get_query_var('paged')); echo '<p class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog - Page ' . $current_page . '</p>'; } else { echo '<h1 class=”main-title” itemprop=”headline”>Dark Stories True Crime Blog</h1>'; } ?> November 4, 2020 at 1:51 am #1517283 David Thank you so much, that has worked perfectly. Best Regards, David November 4, 2020 at 3:21 am #1517395 DavidStaff Customer Support Glad to hear that ! Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In