WordPress.org

Support

Support » How-To and Troubleshooting » deleting code for posts and comments

deleting code for posts and comments

  • melanie bund
    Member

    @melanie-bund

    am using the twentyten template and would like to know how to take out the posts and comments as the page should not look like a blog
    thanks
    melanie

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi
    Forum Moderator

    @esmi

    Don’t edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    melanie bund
    Member

    @melanie-bund

    thanks so much for the fast reply – was so surprised – will try this…
    thanks again

    melanie bund
    Member

    @melanie-bund

    but sorry next question if i do create a child theme do i just in css
    comment out the /* #comments {…. */ and the in the page.php comment out
    >!–<?php comments_template( ”, true ); ?>–> ?
    i read that i could just take out

    * <?php the_time(‘F jS, Y’) ?><?php edit_post_link(‘, Edit’); ?>
    * <div class=”comm”><?php comments_popup_link(‘Post Comment’, ‘Comments (1)’, ‘Comments (%)’); ?></div>

    but this i cant find anywhere in the index or page or single page.php
    thanks
    melanie

    esmi
    Forum Moderator

    @esmi

    You need to create copies of these template files in your child theme. You can then edit the copies as much as you like.

    Your “missing code” block is probably in the parent’s loop.php template file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘deleting code for posts and comments’ is closed to new replies.