WordPress.org

Ready to get started?Download WordPress

Forums

Hiding Tags (8 posts)

  1. chris392
    Member
    Posted 4 years ago #

    Greetings!

    I would like to hide the tags that appear in posts under Categories and Archives. Preferably, hidden tags should be the default position throughout the site: christopherpavlov.com.

    What are the steps I need to go through to accomplish this?

    Can anyone help?

    Thank you in advance.

    Chris392

  2. chris392
    Member
    Posted 4 years ago #

    How do I hide the tags that appear in posts listed under Categories and Archives at christopherpavlov.com?

  3. MichaelH
    Member
    Posted 4 years ago #

    With the help of the Template Hierarchy article, determine what Template is displaying your posts, then look for the code that display categories and tags. That code is usually 'the_category' and 'the_tags'.

    For example using the WordPress Default theme, in the wp-content/themes/default/index.php you would find this code and delete it:

    <?php the_tags('Tags: ', ', ', '<br />'); ?>
  4. chris392
    Member
    Posted 4 years ago #

    I switched to the M. Heillman theme.

    Then, in the Main Index Template (index.php) I deleted:

    <?php the_tags('Tags: ', ', ', '
    '); ?> Posted in <?

    from line 24.

    In Single Post (single.php) I deleted:

    <p>Tags: ', ', ', '</p>

    From line 9.

    I didn’t have any success with the above so I also did the following:

    in Archives (archive.php) I deleted:

    <?php single_tag_title(); ?>

    from line 10.

    I have I made an error or missed something?

  5. Nicole
    Member
    Posted 4 years ago #

    I think you made at least one error by deleting the following code:

    <?php the_tags('Tags: ', ', ', ' '); ?> Posted in <?

    You should've just deleted the following:

    <?php the_tags('Tags: ', ', ', ' '); ?>

    Not the:

    Posted in <?

    And I'm sure you didn't need to delete:

    <?php single_tag_title(); ?>

    Did that make any sense?

  6. chris392
    Member
    Posted 4 years ago #

    Thank you for your response.

    Unless I'm missing something, from what I can see the corrections you suggested have already been made, but not by me.

    Unfortunately, the tags are still present under Categories and Archives.

    Do you have any other ideas?

  7. chris392
    Member
    Posted 4 years ago #

    Unless I'm missing something, from what I can see the corrections you suggested have already been made, but not by me.

    Unfortunately, the tags are still present under Categories and Archives.

    Do you have any other ideas?

  8. overthehill
    Member
    Posted 4 years ago #

    Thanks Michael H! I 'm completely new at this and been searching around for a way to remove tags in posts but leave them in the tag cloud at the bottom. The removal of <?php the_tags('Tags: ', ', ', '
    '); ?> in the vina theme worked perfectly! Very chuffed :)
    http://www.ruthes.co.uk

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.