• Hi,
    Just I am a newbie to WP. I am googled several times and do site search but no satisfying reply.
    I am trying to use WP as CMS. Imagine this I am selling some small handcrafts. I write posts (as products) and add images related to product. So, one post makes me “a product”.

    Finally, I am trying to hide folowing metatags from all posts.
    – Author
    – Date/Time
    – “Comments and Trackbacks Closed” label
    – Feed link for post

    Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • You have to edit the theme’s template files to comment out or delete the lines of code displaying the information you don’t want on the site.

    The exact lines to comment out will vary from theme to theme but will be fairly obvious because they will be PHP code referring to “author”, “datetime”, “comments”, and feeds.

    your theme files are found in
    /wp-content/themes/{themename}/ of the theme you are using

    files to look in are
    index.php
    single.php
    page.php
    category.php
    archive.php

    Not all themes will have a category.php file, and not all of those files may need any code deleted or commented out. If you are going to change anything its a good idea to make a copy of a file you are about to change, so if you make a mistake you can revert back to the original version.

    I had a similar problem. I wanted to hide the “comments are closed” mention in the theme notsofresh in French. I made the following changes wich should work in most of the other themes :

    – To hide the mention “comment are closed” on a single post :
    1 : Find the file “comments php”
    2 : Find the line <p><?php _e('Les commentaires sont clos'); ?></p>
    3 : Comment it out by adding <!– and –>
    4 : Result <!--<p><?php _e('Les commentaires sont clos'); ?></p>-->

    – To hide the mention “no comments” on the homepage, just under the post title ;
    1 : Find de the file “index.php
    2 : In the postmetas, find the line <span class="post-comment"><?php comments_popup_link(__('Aucun Commentaire'), __('1 Commentaire'), __('% Commentaires'), 'commentslink', __('Commentaires clos')); ?></span>
    3 : Comment it out by adding <!– and –>
    4 : result : <!--<span class="post-comment"><?php comments_popup_link(__('Aucun Commentaire'), __('1 Commentaire'), __('% Commentaires'), 'commentslink', __('Commentaires clos')); ?></span>-->

    Et voilà ! [^_^]

    If you want the mentions to appear again, just delete the <!– and –>

    Hope this was helpful

    Thanks SachaL, I found this info very useful.

    Another option that removes the following via css, which is a little easier to undo if you think you might want to “turn it back on” in the future:

    Removes:
    “Posted by admin on Saturday, June 19, 2010 · Leave a Comment (Edit)”

    Add the following to your main css file:

    .postauthor {
    	display:none;
    }

    in template im using this is what works
    .entry-meta {display:none;}
    put in any place in style.css

    and this one to remove information at the bottom
    .entry-utility {display:none;}

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide Post Date, Author, Comments Closed Info, RSS’ is closed to new replies.