WordPress.org

Ready to get started?Download WordPress

Forums

Hide categories and tags on home page only (9 posts)

  1. magician1111
    Member
    Posted 4 years ago #

    When I use '<!--more-->' I would like to see only the title of the post and the teaser on the home page, that is, I would like to see only a list of titles and their teasers on the home page. Is there some way to hide the categories and tags only on the home page?

  2. Yeah, edit your theme and remove them from the layout of index.php.

  3. magician1111
    Member
    Posted 4 years ago #

    Thank you, that sounds doable. I appreciate the quick reply...This way they will still be on the post everywhere else besides the home page? Sorry to be so ignorant, I'll read more too, but to confirm, is that what index.php has to do with, only changes to the home page?

  4. MichaelH
    Member
    Posted 4 years ago #

    Review Template Hierarchy to understand what WordPress uses to render posts in certain conditions.

    But your theme's index.php is probably the place to look. If you were using the WordPress Default theme, you would edit wp-content/themes/default/index.ph and delete this code:

    <?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?>
  5. NOTE!

    If you edit the default theme, it WILL get overwritten when WordPress upgrades!

    I would suggest making a child theme of the default theme, or making DAMN sure you back it up before upgrading WP :)

  6. magician1111
    Member
    Posted 4 years ago #

    Thank you. Great info.

  7. magician1111
    Member
    Posted 4 years ago #

    There was no text in that page, "Template Hierarchy." What are the implications of this to what I'm doing? Have things changed?

  8. magician1111
    Member
    Posted 4 years ago #

    Oh, by the way, I am not using the default theme. Will updating WP affect my changes?

  9. MichaelH
    Member
    Posted 4 years ago #

    Sorry the link is Template Hierarchy.

    And if you don't use the default or classic themes then the update should not affect your theme but as Ipstenu suggested do a backup.

    See WordPress Backups

Topic Closed

This topic has been closed to new replies.

About this Topic