Grow your CSS skills. Land your dream job.

WordPress newbie question on the comments.php file

  • # June 16, 2009 at 10:07 am

    Hi,

    Sorry if this is a basic question but I’m struggling with the following.

    I want to create for the most part a static site in WP. The trouble is that when I add content to static pages I still get the following attached with the text – "By admin, June 12, 2009 7:36 am"

    What line of code do I need to remove from the comments.php that hide’s that info?

    Link to my test site: http://keithlogan.co.uk/wordpress/

    Thanks

    # June 16, 2009 at 12:04 pm

    You aren’t using static pages you are using post pages which is something completely different.
    I’ve just done a quick search and found this video which may help to explain http://wordpresstraining.com/videos/blogging/creating-content-in-wordpress-posts-vs-pages/

    # June 16, 2009 at 6:21 pm

    You don’t want to change comments.php. Assuming you are using pages, they are displayed using the page.php template. All you have to do is look for a section that starts <div class="authormeta"> and remove that entire <div> from the template (including the closing </div>).

    If you don’t wish your pages to have comments then you can turn comments off in the Edit Page screen under Discussion.

    # June 17, 2009 at 5:53 am

    Hi

    I’m not sure which options I need to turn off in the Edit Page screen under Discussion, please see my attached screen grab of the options I have selected.

    Thanks

    # June 17, 2009 at 6:45 am

    Those are the default settings for new posts. If you want to change the settings of existings posts/pages you need to edit the page and change the discussion settings on a per page basis.

    [img]http://farm4.static.flickr.com/3353/3635508254_52268aa514_o.jpg[/img]

    # June 17, 2009 at 8:40 am

    Hi

    I’ve created a new page making sure that ‘Allow Comments’ and ‘Allow Pings’ are switched off.

    I still get the following on the new page:

    By admin, June 17, 2009 5:35 am

    Comments are closed

    I’m missing something here? Sorry.

    Link to new page: http://keithlogan.co.uk/wordpress/?page_id=17

    # June 17, 2009 at 9:02 am

    Which template are you using? Static pages should use page.php if it exists.

    # June 17, 2009 at 9:23 am

    I’m using Panorama.

    It does have a page.php file

    # June 17, 2009 at 9:39 am

    Check this thread http://wordpress.org/support/topic/273815

    # June 17, 2009 at 10:03 am

    thanks for the link.

    I’ve now managed to get rid of the Admin text, however the main text of my new page doesn’t display at all – I only see ‘comments are closed’?

    http://keithlogan.co.uk/wordpress/?page_id=23

    # June 17, 2009 at 12:11 pm

    Ok, I’ve just downloaded the Panorama theme. Pretty weird! Whoever built it obviously doesn’t know the difference between a page and a post.
    Now I haven’t tested this because I really can’t be bothered to add it to any of my local copies of WP, but I’m pretty sure that your page.php should look like this:

    Code:
    < ?php get_header(); ?>

    < ?php if (have_posts()) : ?>

    < ?php while (have_posts()) : the_post(); ?>

    < ?php the_content(__('Continue reading','panorama') . ' '' . get_the_title('', '', false) . ''»'); ?>

    < ?php endwhile; ?>

    < ?php else : ?>

    < ?php _e('Not Found','panorama'); ?>

    < ?php _e('Sorry, you are looking for something that isn't here.','panorama'); ?>

    < ?php endif; ?>

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

# June 17, 2009 at 4:58 pm

It shows the following for me :mrgreen:

New page 2

testing new page in WP

# June 18, 2009 at 2:18 pm
"davesgonebananas" wrote:
It shows the following for me :mrgreen:

New page 2

testing new page in WP

Probably because he’s switched back to the default theme. :D

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".