Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there.

    If you want to hide all post meta and comments then you can do this with CSS, this is the easiest and quickest way:

    .postmetadataw, .postmetadata, #commentsbox {display:none;}

    Read more about Child Themes here:

    http://codex.wordpress.org/Child_Themes
    http://premium.wpmudev.org/blog/create-wordpress-child-theme/

    You can instead use a plugin if you like:

    http://wordpress.org/plugins/custom-css-manager-plugin/screenshots/

    http://wordpress.org/plugins/my-custom-css/screenshots/

    http://wordpress.org/plugins/pc-custom-css/

    http://wordpress.org/plugins/imporved-simpler-css/screenshots/

    Or you could edit the code (in a child theme) and remove those elements so they are not even processed. The class appears in 6 files:

    archive.php
    blog.php
    home.php
    index.php
    search.php
    single.php

    Remove the line:

    <p class="postmetadataw">Posted by: <?php the_author_posts_link() ?> | on <?php the_time('F j, Y'); ?></p>

    The search.php file looks like this one:

    <p class="postmetadataw">Entry Date: <?php the_time('F j, Y'); ?></p>

    The .postmetadata appears on the same files but lower down and looks like this:

    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); the_tags('Tags: ', ', ', ' | '); ?><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »' . '<br />'); ?></p><br />

    And finally the #commentsbox looks like this:

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php the_tags('<br />Tags: ', ', ', '<br />'); ?></p>

    And in these files:

    fullwidth.php
    page.php

    You will find these:

    <?php comments_template(); ?>

    Removing those is more involved, you should be careful and not do this on a live site but instead test it on a sandbox site first just incase you get it wrong. Don’t do it in the main theme, you’ll lose these changes every update. But saying that, you will need to keep an eye on what files change each update because this is a fair amount of small changes to some key files.

    Hope this helps. 🙂

    Take care!

    Thread Starter Neringa

    (@mvlt)

    Hello, Timothy,
    a very great thanks for you!
    It works with the first plugin!
    It’s so easy when you know how.

    Best regards
    Neringa

    Thread Starter Neringa

    (@mvlt)

    The problem resolved perfectly!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to remove post meta section’ is closed to new replies.