Support » Themes and Templates » Display page without date

  • Resolved GokuMew2


    Hi. I was just wondering how to make a page and have it NOT display the date and category info. My PHP isn’t too good. I tried this out but it did not work:

    <?php wp_list_pages('sort_column=menu_order&title_li=&show_date='); ?>

    I’m not sure if that’s where the show_date parameter should be entered.

    I’m using the Green Marinee template, by the way.

    Also, is there a way to have pages that aren’t a part of any category? Uncategorized is sort of a category (though I renamed it to “content”). What’s wierd though is that when I click on that “content” link that shown under the title of a page, it says there are no search results.

    It’d be great if I could get rid of the “Comments are closed” on all the Pages as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Perhaps the easiest solution is to:

    1. Copy the index.php from the theme’s (Green Marinee) directory.

    2. Name the copy page.php. This will now be used automatically by WordPress as the template for Pages.

    3. Edit this line in your new page.php:

    <div class="meta"><?php _e("Posted in"); ?> <?php the_category(',') ?> by <?php the_author() ?> on the <?php the_time('F jS, Y') ?> <?php edit_post_link(__('Edit This')); ?></div>

    the_category() and the_time() are what you’re after for category and date listings. Should end up looking like this:

    <div class="meta"><?php _e("Posted by"); ?> <?php the_author(); ?> <?php edit_post_link(__('Edit This')); ?></div>

    4. For the comments issue, remove this line completely:

    <?php comments_template(); ?>

    I think (at least with WP 2+) the default is not to show the date, so just remove the date= part all together.

    I assume you mean from the link/link title for the pages, right?

    Awesome!! Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display page without date’ is closed to new replies.