• 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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    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.

    Thread Starter TGould

    (@tgould)

    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!

    So you can probably delete this.

    please simply mark the topic as ‘resolved’ – thanks ??

    topics don’t get deleted in this forum – https://codex.www.ads-software.com/Forum_Welcome#Deleting_.2F_Editing_Posts

    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

    Uval

    (@uval)

    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>

    [email protected]

    (@chandanmishra2009hotmailcom)

    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: https://codex.www.ads-software.com/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(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Date on Posts’ is closed to new replies.