WordPress.org

Ready to get started?Download WordPress

Forums

How to remove category name from post title? (3 posts)

  1. JanChristian
    Member
    Posted 3 years ago #

    On the main blog page, I don't want the category to be listed before the post title. My index.php has the following code, does this part contain the category stuff I need to edit? Or is it elsewhere? I don't want to just start deleting things as I have a tendency to break sites :)

    GrenadeGearUSA.com

    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><span><?php the_category(', ') ?> </span> → <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    try and remove this section from your code:

    <span><?php the_category(', ') ?> </span> →

  3. JanChristian
    Member
    Posted 3 years ago #

    Perfect. Thanks. I also had to include the &rarr as that was the arrow. I just made the code into a comment for future reference.
    <!-- <span><?php the_category(', ') ?> </span> &rarr; -->

Topic Closed

This topic has been closed to new replies.

About this Topic