WordPress.org

Ready to get started?Download WordPress

Forums

category page incorrect h1 (3 posts)

  1. venturestein
    Member
    Posted 1 year ago #

    I find that the h1 of my category pages have unwanted text in the h1 title. Following the correct category name unwanted text this is. I have two categories one shows category title and blog title in the same h1, the other category title and author username in the same h1.

    Example:
    While "Title" is my correct category name.
    correct -> <h1>Title</h1>
    incorrect category 1 -> <h1>TitleBlog_Title</h1>
    incorrect category 2 -> <h1>TitleAuthor</h1>

    Like they are pulling something "too much" in their tittles, would seem like there's a closing bracket missing somewhere. However i can't spot it or understand what else could it be.

    Here is my single.php in case it helps at all

    <?php get_header(); ?>
    
    <div id="middlecontent">
    
    <?php theme_options_show_breadcrumbs(); ?>
    
       <div <?php post_class() ?> id="post-<?php the_ID(); ?>">	
    
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
       <h1 class="title"><?php the_title(); ?></h1>
    
         <div class="bylines">
    
              <?php if (!get_theme_option('bylines-hide-date')) { the_time('F j, Y'); } 
    
       if (!get_theme_option('bylines-hide-author')) { ?> by <?php the_author_posts_link(); }  edit_post_link(' (Edit)', '', ''); ?>
    
         </div>
    
          <?php the_content();?>
    
    <div class="moreinfo"><?php if (!get_theme_option('bylines-hide-category')) { ?> posted in <?php the_category(', '); } ?> •  <a href="<?php the_permalink(); ?>#comments">   <?php comments_number(); ?></a></div>
    
            <?php endwhile; else: ?>
    
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    
         </div>
    
      <?php comments_template(); // Get comments template ?>
    
    </div><!-- Middle Content  -->
    
    <?php get_footer(); ?>

    Thank you in advance

  2. bknutson
    Member
    Posted 1 year ago #

    Are you saying that the title of the post has unwanted text following it, or there is an unwanted style? Could you give us a link so we can see what you are referring to?

  3. venturestein
    Member
    Posted 1 year ago #

    The title of the category page (h1) has unwanted text following it. I have edited the post, to make it more clear. This is going on locally.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.