WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Display page without date (4 posts)

  1. GokuMew2
    Member
    Posted 8 years ago #

    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.

  2. Kafkaesqui

    Posted 8 years ago #

    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(); ?>

  3. niziol
    Member
    Posted 8 years ago #

    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?

  4. GokuMew2
    Member
    Posted 8 years ago #

    Awesome!! Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.