WordPress.org

Ready to get started?Download WordPress

Forums

is missing (15 posts)

  1. Martin1982
    Member
    Posted 3 years ago #

    I don't know how but H1 tag is gone. H2,H3 are ok but H1 is missing. Anyone knows how to add it manually and where is the best place in code to write it?

    My site is located here:
    fotografas

  2. i_banks
    Member
    Posted 3 years ago #

    <h1> tags are used for titles...I don't see the use of titles on your page...looks like you have only pics with one main title which is graphically designed.

    If you do need the <h1> tag, you include it in your 'loop.php' file

    <h1 class="entry-title" style="height:60px; width:250px; text-align:center; border-bottom:1px solid #b5b5b5;"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>

    which outputs the title for each image post.

  3. Martin1982
    Member
    Posted 3 years ago #

    Thanks for quick reply. I can't seem to find loop.php where is located?

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    In your theme folder. If you do not have a loop.php file, you will need to edit the relevant template file(s) individually.

  5. Martin1982
    Member
    Posted 3 years ago #

    There is no such file. I see only:

    404 Template
    (404.php)
    Comments
    (comments.php)
    Footer
    (footer.php)
    Full Width Page Template
    (page_wide.php)
    Gallery Page Template
    (page_gallery.php)
    Header
    (header.php)
    Main Index Template
    (index.php)
    Page Template
    (page.php)
    Search Results
    (search.php)
    Single Post
    (single.php)
    Theme Functions
    (functions.php)
    remove-title-attributes.php

    And im using theme from: http://blissfulblog.com

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    Then you need to edit the individual theme template files. Or try re-uploading a fresh copy of the theme.

  7. Martin1982
    Member
    Posted 3 years ago #

    I opened index.php and the first 14 line looks like this:

    <?php get_header(); ?>
    
    <div id="content">
        <div class="postarea">
    
            <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    		<?php global $more; $more = 0; ?>
    
            <?php if ( in_category('gallery') && !is_single() ) continue; ?>
    
            <div <?php post_class(); ?>>
    
            <div class="posttitle">
    
                <div class="postdate">
                	<div class="day"><?php the_time('d') ?></div>
                    <div class="month"><?php the_time('M') ?></div>
                </div>
    
                <h5><?php the_category(' , '); ?></h5>
                <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
            </div>

    Maybe somewhere here?

  8. Martin1982
    Member
    Posted 3 years ago #

    Ok so i went through original theme php files and i found h1 heading only in 404.php but this makes no sense at all. I need it in the front page.

    Any clues?

  9. esmi
    Forum Moderator
    Posted 3 years ago #

    Then you need to edit index.php and add it.

  10. Martin1982
    Member
    Posted 3 years ago #

    Where should i put exactly?

  11. esmi
    Forum Moderator
    Posted 3 years ago #

    Try changing:

    <div <?php post_class(); ?>>
    <div class="posttitle">

    to:

    <div <?php post_class(); ?>>
    <div class="posttitle">
    <h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Post');?> <?php the_ID(); ?> - <?php _e('permanent link');?>"><?php the_title();?></a></h1>
  12. Martin1982
    Member
    Posted 3 years ago #

    Thanks for your help, but It creates additional title before category, smth is not ok.

  13. mkirkwag
    Member
    Posted 3 years ago #

    I have a whole collection of themes downloaded from the wordpress site and not one of them has a loop.php file, nor is it an option in the wordpress theme editor. There seems to be a disconnect between what the expert coders are expecting to see and what we amateurs find. Any idea why this confusion exists?

  14. esmi
    Forum Moderator
    Posted 3 years ago #

    and not one of them has a loop.php file

    Then you simply have a number of themes using slightly older templates. The loop.php template file was introduced in WordPress 3.0. See the Twenty Ten theme for an example.

  15. Martin1982
    Member
    Posted 3 years ago #

    Anyone has a simple solution for my problem? Maybe i should change <h2> into <h1> and thats it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags