WordPress.org

Ready to get started?Download WordPress

Forums

Central
[resolved] Hide Post Dates from posts and pages (2 posts)

  1. rdenglish9o
    Member
    Posted 1 year ago #

    I want to hide the post dates that appears on my pages. Example is Posted on July 10, 2013.

  2. bestwebsoft
    Member
    Theme Author

    Posted 1 year ago #

    Hi,

    1) If you want to remove it from single pages, please open page.php file, and find lines 22-25
    <p class="post-date">
    <?php /* show date of publication of current page */
    _e( 'Posted on ', 'central' ); ?>"
    title="<?php the_title(); ?>" rel="bookmark"><span id="date"><?php the_date();
    ?></span>

    </p>

    and change them for

    <!--
    <p class="post-date">
    <?php /* show date of publication of current page */
    _e( 'Posted on ', 'central' ); ?>"
    title="<?php the_title(); ?>" rel="bookmark"><span id="date"><?php the_date();
    ?></span>

    </p>
    -->

    2) if you want to remove it from single posts, please find single.php file and line 27

    <p class="post-date"><?php /* show date navigation and categories of current
    post */ _e( 'Posted on ', 'central' ); ?><a href="<?php the_permalink(
    get_the_ID() ); ?>" title="<?php the_title(); ?>" rel="bookmark"><span
    id="date"><?php the_date(); ?></span><?php _e( ' in ', 'central' );
    the_category( ', ' ) ?></p>

    and change it for

    <!--
    <p class="post-date"><?php /* show date navigation and categories of current
    post */ _e( 'Posted on ', 'central' ); ?><a href="<?php the_permalink(
    get_the_ID() ); ?>" title="<?php the_title(); ?>" rel="bookmark"><span
    id="date"><?php the_date(); ?></span><?php _e( ' in ', 'central' );
    the_category( ', ' ) ?></p>
    -->

    Sincerely,
    BestWebSoft Support Team

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags