• Resolved Dr_Bob

    (@dr_bob)


    Thank you for developing this very useful plugin. I am using it to render all post snippets to render on my home page via…
    [ic_add_posts]
    Works perfectly…
    The name of the category renders under the post/article snippet on home page. However, I would I would like to eliminate all tags from rendering below each snip. The tags are very frequently extremely repetitive under the snippets. Can you provide to me the short code that will only eliminate tags from the post snippets. The category that is associated with the post is just fine, once again is just fine.
    Thank you in advance for this direction.

    https://www.ads-software.com/plugins/posts-in-page/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi Dr_Bob,

    I’m glad to hear you’re finding the plugin useful.

    In order to change the layout of the output in the way you’re describing, you’ll need to create a copy of the plugin’s template, place it in your theme directory, and edit that copy.

    Here is a post that discusses creating and editing a custom template.

    In your case, since you want to remove the list of Tags, you’ll want to delete the code responsible for printing that list.

    Here is a snippet from the plugin template (posts_loop_template.php).

    <!-- This is the output of the META information -->
    	<div class="entry-utility">
    		<?php if ( count( get_the_category() ) ) : ?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<?php
    			$tags_list = get_the_tag_list( '', ', ' );
    			if ( $tags_list ):
    		?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    		<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    	</div>

    I think if you delete the following, you will get close to what you want.

    <?php
    			$tags_list = get_the_tag_list( '', ', ' );
    			if ( $tags_list ):
    		?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>

    Doing so will result in that first snippet looking like the following.

    <!-- This is the output of the META information -->
    	<div class="entry-utility">
    		<?php if ( count( get_the_category() ) ) : ?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    
    		<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    		<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    	</div>

    Does that help?

    Thread Starter Dr_Bob

    (@dr_bob)

    I want you to know how much I appreciate the effort you put into responding to my inquiry. I will have my PHP/WP coder work with the code you provided. Hopefully, this direction will remove tag references that render with the Article Snippet and Category link on the home page, but continue to maintain the tag references in the Post/Page footers in the customary manner. Once again, thank you for responding to my inquiry requesting this direction.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Would like to remove all tags from rendering on posts’ is closed to new replies.