WordPress.org

Ready to get started?Download WordPress

Forums

Remove Date on Posts (7 posts)

  1. TGould
    Member
    Posted 1 year ago #

    I did what this forum post said to do but it did not work for me. I have a client who wants me to remove the date off posts so readers won't know how long it goes between posts. Any other suggestions other than the ones mentioned at the link above since it is three years old.

  2. Can you provide us with a link? The way I would do it is just to hide the date via CSS but editing/creating a child theme file is usually an option too.

    If we had a link we could just see what theme you are talking about.

  3. TGould
    Member
    Posted 1 year ago #

    You know what, a team of Virtual Assistants helped me figure out that I had missed removing it from index.php in the editor section. I had just done the singlepost.php. So you can probably delete this.

    Thanks so much for your quick response!

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    So you can probably delete this.

    please simply mark the topic as 'resolved' - thanks ;-)

    topics don't get deleted in this forum - http://codex.wordpress.org/Forum_Welcome#Deleting_.2F_Editing_Posts

  5. Mohammed Mazhar
    Member
    Posted 1 year ago #

    Removing dates from wordpress posts is very easy. All you have to do is open your themes index.php file, and some where in that file these is a piece of code which looks like

    <?php the_time(); ?>
    , you can comment or delete this. If you want the complete guide then you can visit the link that i have given above. Hope this helps

  6. Uval
    Member
    Posted 1 year ago #

    I tried to comment it out but it didn't work.
    I'm new to this....can someone please show me how to comment out the date and comments?

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <div id="blog">
                <?php $excludefeatured = get_option('ct_featured_category', $single = true); ?>
                <?php global $post; $blogpost = get_posts('numberposts=2&category=-'.$excludefeatured);
                foreach($blogpost as $post) : ?>
                    <div id="blogpost">
                        <div class="meta left">
                            <p class="date"><?php the_time('d'); ?></p>
                            <p class="month"><?php the_time('F'); ?></p>
                            <div class="commentnum-wrap">
                                <p class="commentnum"><a>"><?php comments_number('0','1','%'); ?></a></p>
                            </div>
                        </div>
  7. chandanmishra2009@hotmail.com
    Member
    Posted 1 year ago #

    I tried to comment it out but it didn't work.
    I'm new to this....can someone please show me how to comment out the date and comments?`<?php global $theme; get_header(); ?>

    <div id="main">

    <?php $theme->hook('main_before'); ?>

    <div id="content">

    <?php $theme->hook('content_before'); ?>

    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    /**
    * The default post formatting from the post.php template file will be used.
    * If you want to customize the post formatting for your homepage:
    *
    * - Create a new file: post-homepage.php
    * - Copy/Paste the content of post.php to post-homepage.php
    * - Edit and customize the post-homepage.php file for your needs.
    *
    * Learn more about the get_template_part() function:
    http://codex.wordpress.org/Function_Reference/get_template_part
    */

    get_template_part('post', 'homepage');

    endwhile;

    else :
    get_template_part('post', 'noresults');
    endif;

    get_template_part('navigation');
    ?>

    <?php $theme->hook('content_after'); ?>

    </div><!-- #content -->

    <?php get_sidebars(); ?>

    <?php $theme->hook('main_after'); ?>

    </div><!-- #main -->

    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic