WordPress.org

Ready to get started?Download WordPress

Forums

Adding H1 tags to posts (12 posts)

  1. Robg48
    Member
    Posted 1 year ago #

    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
    http://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.]

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    What theme is this?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

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

  4. Robg48
    Member
    Posted 1 year ago #

    It's from Elegant Themes - the title is "Aggregator".

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    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 http://www.elegantthemes.com/forum/

  6. Robg48
    Member
    Posted 1 year ago #

    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

  7. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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.

    http://codex.wordpress.org/Function_Reference/get_template_part

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  9. Robg48
    Member
    Posted 1 year ago #

    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 ;)

  10. Robg48
    Member
    Posted 1 year ago #

    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.

  11. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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)

  12. Robg48
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic