Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #60614

    Steve C
    Participant

    Hi.
    I have a recipes, blog and videos page. All my posts have a huge “tags” listed next to them. How do I hide tags on posts?

    http://www.bartendingbootcamp.com

    thanks.

    #61079

    Zeshan
    Member

    Hi Steve,

    Thank you for writing in!

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After that please find and remove the following line of code from the file x/framework/views/integrity/wp-index.php

    <?php x_portfolio_item_tags(); ?>

    This will remove the tags. If you find any problem, don’t hesitate to let us know we will be happy to assist you.

    Thank you.

    #62921

    Steve C
    Participant

    I am already using the child theme and cannot find that file at all. I used filezilla to look and nothing was found.

    Help!

    http://www.bartendingbootcamp.com

    #63028

    Zeshan
    Member

    Hi Steve,

    Thank you for writing in!

    Would you mind providing us the FTP credentials so that we can take a closer look? In the mean time you can try the following method.

    Please also note that the file you have to find is located inside the parent X theme. Which can be found in wp-content/themes/x/framework/views/integrity/.

    Please duplicate the file content-portfolio.php from the above path to framework/views/integrity/ in your child theme. Open the copied file in an editor and remove for the following line of code:

    <?php x_portfolio_item_tags(); ?>

    Hope this helps. Please let us know if you face any difficulty, we’ll be happy to assist.

    Thank you.

    #63141

    Steve C
    Participant

    It worked!

    It just hid the tags right? They are still there, just not visible?

    Thank you.

    Steve.

    #63236

    Zeshan
    Member

    Hi Steve,

    Thank you for dropping by!

    Using the above method removes the tags from your portfolio page. If you want to keep them but hidden. You can simply delete the above added file “content-portfolio.php” from your child theme’s folder framework/views/integrity/ and add the following CSS code to Customizer > Custom > CSS:

    .x-portfolio .entry-extra .x-ul-icons,
    .x-portfolio .entry-extra .h-extra.skills {
       display: none;
    }

    Hope this helps. Please let us know if you still face any issue, we will be happy to assist.

    Thank you

    #679709

    sndesign
    Participant

    Hi there I’m looking for the similar situation for my blog page.
    How do I hide the “tags” for the blog page (where all blog posts show up)? I don’t want to remove the tags, simply hide them and any extra spacing it may have added. Thanks!

    #679714

    Lely
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your blog URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #690686

    sndesign
    Participant
    This reply has been marked as private.
    #691237

    Lely
    Moderator

    Hello There,

    Thank you for the admin credentials.
    To hide the tags on your blog page please update the following custom CSS:

    .entry-footer {
      display: block;
      margin: 10px auto;
      text-align: center;
    }

    To this:

    .blog .entry-footer {
        display: none;
    }

    Since you’re using Masonry layout, we cannot remove the extra space it leaves after hiding those tags because the position of the post was automatically calculated on the fly.

    Hope this helps.

    #699881

    sndesign
    Participant

    Hi there,
    Thanks for that. I recall doing something similar for my portfolio page however don’t know what to find for the blog page. I would like to remove the tags from the blog page altogether (not individual post page). I was going to do that in my child theme. Which file should I be copying from the X framework/views and what line to edit? Please and thank you!

    #700207

    Rue Nel
    Moderator

    Hello There,

    To remove the tags in the blog index and archive pages, you may use this code:

    .archive .entry-footer,
    .blog .entry-footer {
        display: none;
    }

    If you also want to remove the tags on individual pages, you use this code:

    .single-post .entry-footer {
        display: none;
    }

    If you do not want to use the codes above and opted to change the template it self, since you already have the child theme active and ready, please follow the following steps.

    1] Please create a new file in your local machine.

    2] You need to insert the following code into that file:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/_CONTENT-POST-FOOTER.PHP
    // -----------------------------------------------------------------------------
    // Standard <footer> output for various posts.
    // =============================================================================
    
    // do not display tags
    $display = false;
    
    ?>
    
    <?php if ( has_tag() && $display ) : ?>
      <footer class="entry-footer cf">
        <?php echo get_the_tag_list(); ?>
      </footer>
    <?php endif; ?>

    3] Save this file named as _content-post-footer.php and

    4] Upload this file in your server into your child theme’s folder
    wp-content/themes/x-child/framework/views/integrity

    Please let us know how it goes.

    #700434

    sndesign
    Participant

    Words greats but it removed the tags from individual posts page too.

    #700478

    Rue Nel
    Moderator

    Hello There,

    You can update your code to this:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/_CONTENT-POST-FOOTER.PHP
    // -----------------------------------------------------------------------------
    // Standard <footer> output for various posts.
    // =============================================================================
    
    ?>
    
    <?php if ( has_tag() ) : ?>
    
      <?php if ( is_single() ) : ?>
        <footer class="entry-footer cf">
          <?php echo get_the_tag_list(); ?>
        </footer>
      <?php endif; ?>
    
    <?php endif; ?>

    The tags will only be displayed on individual posts and will not be displayed in the blog index and archives pages.
    Please let us know how it goes.