How to Remove Tags/Leave a Reply (6 posts)

  1. paulgian
    Posted 3 years ago #

    Hi all,

    This is my blog on diamonds and I am having quite a bit of difficulty in removing the parts as indicated in the diagram as shown here:

    Photo attachment to show issue.

    I would like to remove the tags, leave a reply from each of the posts in the home page.

    Any kinds souls can offer advice?

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    edit content.php;


    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			<?php endif; // End if $tags_list ?>

    and remove:

    <?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    			<?php endif; // End if comments_open() ?>
  3. paulgian
    Posted 3 years ago #

    hi sweeper,

    thanks for the super fast response. the tags on the homepage are removed. It works!

    What about for inner pages?

    For example, http://onlinediamondbuyingguide.com/blog/recommendations/2012/05/ideal-cut-f-color-vs2-round-diamond/

    Which file should i edit to do the same for the above mentioned problem?

  4. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    rahter than editing Twenty Eleven directly, strongly consider to create a child theme to work with:

    apart from the fact that an unedited default theme Twenty Eleven is needed in case of problems, a child theme also helps to keep customisations which otherwise will get overwritten with the next upgrade of the theme.

    to remove the tags, have a look into content-single.php - the code looks a bit different - if you have problems, post again.

  5. paulgian
    Posted 3 years ago #

    hi sweeper,

    I did some trial and error with the portion of code that seems like it. However, when i remove parts of the code, the page simply refuse to load completely. It seems like i can't simply remove portions of it without affecting the overall code.

    I would like to keep the section of "This entry was posted in Recommendations" BUT remove the rest that follows.

    What do you think i should do here?

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  6. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    if you want to remove the tags and the 'by author' and the 'bookmark...', replace your snippet with:


Topic Closed

This topic has been closed to new replies.

About this Topic