Need help? Check out our Support site, then

Remove date and author name from Pages using Garland theme CSS

  1. Hi, I have setup the feature to edit CSS on my blog, and I have setup a number of pages of content, that are not meant to be post pages, and have designated certain pages for posting. Trouble is with this theme, unlike other themes I have used for other blogs, is that the date you setup the page and my username as the author, appear at the top of the page under the page name. This is ok for posts which are date relevant, but my pages are not post content, so I dont want the date and author name to appear but cant tell from the CSS how to remove, if I can. Or do I basically have to choose another design?
    Thanks for any assistance, Vanessa

    The blog I need help with is

  2. Please give us a link to your blog.

  3. Oops sorry, here it is

  4. Sorry, the date and author have the same class id on both the pages and the main posts. I'd guess this is the same on most themes. Sorry.

  5. Hi,

    You can use categories or tags to handle this. If you give your "About us" article a "About" category you can identify it with css.

    div.category-About span.submitted {display:none}

    This affects only the author and date fields for articles with the category "About"

    see if it works.

  6. Indeed -- seems like it would be a good idea if pages and posts already were labeled with classes to distinguish them -- as a built in feature. Thoughts?

  7. A lot of work to change all the CSS and all the underlying theme files to support that. A big job. In some cases there would most likely have to be completely new PHP files written to accommodate having them separate, and then having to modify each file that calls that other file. Then there is all the testing in all the browsers on all the different operating systems, and the inevitable changes because it behaves badly in one or more browser and then the change to accommodate that browser breaks things in another browser. Etc.

  8. I'm rapidly coming to the conclusion that everything should revolve around Sandbox, and all themes should be recast as CSS embellishments to that theme. :-)

    Of course, when I soon plunge into doing that myself (for one theme) I may change my mind!

    (FWIW, Sandbox 10 does provide classes to distinguish page and post, but on the other hand, does not show author/date on Pages at all. Hmm.)

  9. Thanks Otomo for that suggestion.... the pages I have setup are Pages not Posts, and with this theme I cant categorise a Page unfortunately.... so its a real pain, but thank you all for your assistance, it is greatly appreciated. I have used other themes that dont do this, but I needed a 3 column format, not just 2 column..... its these little quirky things that arent apparent at first! Back to the drawing board.....!

  10. A thought - if I made the date and author text white - it would still be there but wouldn't appear - that would give me the outcome I am looking for in a round about way.... how do I reference the class ID and make this change? Appreciate your assistance :-)

  11. wellnessgeneration: Otomo's point was that you need some way to distinguish pages from posts. O's suggestion was to apply a *category* to the pages to make that happen. However, it looks to me that categories only appear for posts, and not for pages, so that's a dead end.

    You may be refering to the option on pages to set a particular *template* -- but Garland doesn't apparently offer that feature (and maybe that's what you were referring to.)

    Your suggestion to change the date/author to white is not really necessary, you could just apply display:none and make them disappear completely -- but that's going to apply to both pages and posts unless you can distinguish them.

    So, the current state-of-play seems to be we're still looking for a way to distinguish post from page.

  12. OK, I was confused -- looks like all the content on your site currently is pages, no posts -- is that right? Anyhow, looking at a Garland site that has both pages and posts, there is an exploitable difference.

    <div class="post hentry category-uncategorized">
    <span class="submitted">2009/01/11 — someuser

    <div class="page hentry category-uncategorized post">
    <span class="submitted">2009/01/11 — someuser

    Ie: Pages have an added "page" class for the div that surrounds the content items. So...

    .page .submitted {

    ... should do the trick.

  13. Thank you for your help.... I have tried
    .page.submitted {

    Also tried
    page.submitted {

    and tried
    page submitted {

    But none of these have worked - the post date and name of author is still showing at the top of the page... where to from here?

  14. Thanks everyone, I have figured out a workaround... I have changed the format of the date and time display so that it doesnt appear, and then I changed my author name to a tag line... so its all good - thanks for your help. It was very much appreciated. Vanessa

  15. Hi All,

    I have seen quite a bit of questions come in about how to remove the author and date from pages in a WordPress Blog, it really is quite simple here is how you do it.

    Just remove author details from the below mentioned code from page.php file of current active theme:

    <?php the_time('F jS, Y') ?>Author: <?php the_author() ?>

    That’s it, now that was not that hard was it?

    you can find that code on line 13 in your page.php file The first line of code <?php the_time('F jS, Y') ?> is your date and the second line Author: <?php the_author() ?> that is the Author part Delete both save your page.php re-upload it and you are done go to your page and you will see that you no longer have date or Author showing up on your pages. Now it looks a bit more like a regular web site.

    Hope this helps some of you.
    Ryan Sharrer
    Level 5 Development Group, LLC
    Web Design Specialist│Web Hosting| Domains

  16. How do you find the page.php file?

  17. Do you need to upgrade to a premium account in order to make changes to the page.php file?

  18. amylynphoto - Don't hijack threads. There is no access to php files with blogs. If you have a further question about this, please start a new thread.

  19. @rsharrer: That answer ONLY applies to self-hosted blogs. This is a support forum for hosted blogs. We do not have access to php files and we cannot make those changes. Your answer is only confusing people unnecessarily (as amylynphoto's answer illustrates).

    @amylynphoto: Ignore rsharrer's answer. It does not apply to blogs. There is no such thing as a 'premium' account. There is VIP hosting which only applies to a few very blogs with exceptionally high hit-rates and which costs around $500/month. In order to make changes to a php file you would need to download the software and install it on your own hosted domain.

  20. wellnessgeneration said:
    > Thank you for your help.... I have tried
    [... several variations that didn't work ...]

    All the variations you show look to be incorrect syntax. I proposed:

    .page .submitted {

    ... note that there's a space between .page and .submitted. Ie: the effect we want is to select an element with class = "submitted" somewhere within an element with class = "page". More elaborately and precisely: span.submitted {

    Sounds like you worked something else out, but in case you return to this issue or someone else stumbles in here for the same problem... the above should do the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic