• I made an “about” page using WP’s “create page” tab in the wpadmin panel. Is there a way to strip the “date” “title” and “posted by” info from entries on this page? I want a clean set of paragraphs simply giving information about the site, the posters and the theme information.

    Thanks in advance for any help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello

    it depends on what theme you are using but simply go into the page theme file (normally called page.php) and remove the following line.

    <?php the_date(‘d.m.y’, ”,”); ?>

    Posted by <?php the_author() ?> @ “><?php the_time() ?>

    these may not be exact since I am using my own theme

    Or, if you don’t have a page.php in your theme – create one. Save index.php as page.php and then edit out everything you don’t want to appear on Pages. WP by default uses index.php to display your Pages if there is no page.php template in the theme.

    Thread Starter lindalu2

    (@lindalu2)

    I’m using “connections” Theme and it did not have a page.php file. I made one per your suggestions moshu (thanks) but unfortunately it doesn’t seem to have any date or author information on it — instead it looks like it calls up post.php and the date/author/etc. information is contained therein as follows:

    <p class="post-date"><?php the_time('D j M Y'); ?></p>
    <div class="post-info"><h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    Posted by <?php the_author(); ?> <?php edit_post_link('(edit this)'); ?><br/><?php comments_popup_link('No Comments', '1 Comment', '[%] Comments'); ?>&nbsp;</div>
    <div class="post-content">
    <?php the_content(); ?>
    <p class="post-info">
    <?php wp_link_pages(); ?>
    </p>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <div class="post-footer">&nbsp;</div>
    </div>

    Here is the info from my body.php page. The only change I have made to it so far (besides changing the title from index.php to body.php) is to remove the comment section (<?php comments_template(); // Get wp-comments.php template ?>).

    <body>
    <div id="rap">
    <?php get_header(); ?>
    <div id="main">
    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <?php require('post.php'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?></p>
    </div>
    <div id="sidebar">

    <?php get_sidebar(); ?>

    <a name="links">
    <h2><?php _e('Links'); ?></h2>
    <ul><?php get_links('-1', '<li>', '</li>', ' '); ?></ul>

    <?php if (function_exists('wp_theme_switcher')) { ?>
    <h2>Themes</h2>
    <?php wp_theme_switcher(); } ?>

    <h2><?php _e('Meta'); ?></h2>
    <ul>
    <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <li><a href="http://validator.w3.org/check/referer&quot; title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
    <li><a href="http://jigsaw.w3.org/css-validator/check/referer&quot; title="valid css">Valid CSS</a></li>
    <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
    <li><a href="http://wordpress.org/&quot; title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>">WordPress</a></li>
    <?php wp_meta(); ?>
    </ul>
    </div>

    <?php get_footer(); ?>
    </div>
    </div>
    </body>
    </blockquote>

    Any suggestions? I am very new to php so am basically flying blind here.

    1. You cannot name the default Page template whatever you want – it has to be page.php in order to be recognized by WP. (After that you can create other Page templates, but those have to have certain lines at the top – see http://codex.wordpress.org/Pages#Page_Templates )
    2. I remember a similar case! To create your Page template save index.php as page.php and then replace the call for the post.php with the actual code from that file and edit it accordingly.

    Thread Starter lindalu2

    (@lindalu2)

    brilliant, moshu. Worked like a charm. Thanks so much for all your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove “date” “posted by” from Page?’ is closed to new replies.