• Okay – try this again as my last attempt dissappeared on me – so if two of these posts show up…;)

    Trying to add H1 tags to all my posts and homepage. The problem is, everywhere I read it says to “change the h2 tag to h1” – usually in the page.php or single.php files. Looking in those files – and my index.php, header.php – I don’t have any “H” tags.

    I’m going to paste the page.php and single.php below and a link to my site – if anyone can help, just tell me what file these “h” tags are in, I can fiddle with it and get it done – but I can’t find them!

    Thanks
    Rob
    https://hitaco.info

    PAGE.PHP —-

    <?php get_header(); ?>
    
    <div id="main-content" class="clearfix">
    	<div id="left-area">
    		<?php get_template_part('includes/breadcrumbs','page'); ?>
    		<div id="entries">
    			<div class="entry post clearfix">
    				<?php get_template_part('loop','page'); ?>
    			</div> <!-- end .entry -->
    
    			<?php if (get_option('aggregate_show_pagescomments') == 'on') comments_template('', true); ?>
    		</div> <!-- end #entries -->
    	</div> <!-- end #left-area -->
    
    	<?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    
    SINGLE.PHP -----
    <?php get_header(); ?>
    <div id="main-content" class="clearfix">
    	<div id="left-area">
    		<?php get_template_part('loop','single'); ?>
    	</div> <!-- end #left-area -->
    
    	<?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    [Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

Viewing 11 replies - 1 through 11 (of 11 total)
  • What theme is this?

    What theme are you using? Where did you download it from?

    Thread Starter Robert

    (@robg48)

    It’s from Elegant Themes – the title is “Aggregator”.

    I’m sorry but as you are using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not support commercial products here.
    Try https://www.elegantthemes.com/forum/

    Thread Starter Robert

    (@robg48)

    This is a theme issue? WordPress itself doesn’t have a way to make post titles encapsulated in an H1 rage?

    I will check out that forum – thanks!

    Rob

    the use of the html h tags is indeed theme specific;

    general info:
    to locate which files/templates might contain the h tags, check the get_template_part() function which you see being used in single.php and page.php; that should point you to further templates which you can investigate.

    https://codex.www.ads-software.com/Function_Reference/get_template_part

    This is a theme issue?

    Correct.

    WordPress itself doesn’t have a way to make post titles encapsulated in an H1 rage?

    No – this is handled by your theme.

    Thread Starter Robert

    (@robg48)

    Hello All – seems to be there are no h1 tags anywhere in this theme – or most Elegant Themes for that matter. Apparently very few themes from this developer have good sep functionality built-in. If you’re using these themes you have to figure out how to add the tags yourself.

    Unfortunately, Alchymyth, I have no idea how to view where that is pointing to ?? I’ve tried opening single.php and page.php in FF and determining using Firebug – to no avail.

    I may be better off utilizing a theme that’s more function than form ??

    Thread Starter Robert

    (@robg48)

    Correction!

    Just was told on the other forum – my theme DOES use H1 tags – and Alchymyth they are in the loop.php page just as you suggested ??

    But, what they can’t tell me is why all the SEO checks I do say I don’t have any H1 tags when the “loop.php” which is called by the “get_template” function does say I have those tags – as below:

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    	<h1 class="title"><?php the_title(); ?></h1>

    From what the other forum folks mentioned this code should be placing my post titles with the h1 tags.

    for instance, this line:

    <?php get_template_part('loop','page'); ?>

    is pointing to a loop-page.php template

    similar with this line:

    <?php get_template_part('loop','single'); ?>

    is pointing to loop-single.php

    (if both files do not exist, then it points to loop.php as a fallback)

    Thread Starter Robert

    (@robg48)

    Hi Alchymyth,

    Yup – I found it – see my previous post. But, for some reason, every SEO tool I use claims I don’t have any h1 tags ??

    But they’re there!

    Thanks for your help…
    Rob

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding H1 tags to posts’ is closed to new replies.