nickposs
Member
Posted 5 months ago #
I'd like the pages on my website to appear more like regular static pages -- so I'd like to hide the time and date stamp on them (the "posted by" and "comments are closed," too--but one thing at a time). I'm using the Panaroma theme and in the page.php file it says:
<div class="authormeta">
<?php _e('By','panorama'); ?> <?php the_author_posts_link(); ?>, <?php the_date($ap_dateTimeFormat); ?></div>
Is there anyway to edit this so that it knows to only show the time/date on posts and not static pages?
Unless you are using a static page with a query_posts on some pages, to display posts on a static page, the page.php file is used only when displaying static pages. Therefore you can delete the lines of code you included in your post.
Just to be safe, save a copy of the file the way it is now before you delete those lines.
nickposs
Member
Posted 5 months ago #
Well, I tried editing the page.php, but it didn't make any difference for the static pages. For example, I tried removing the author meta: `<div class="authormeta"><?php _e('By','panorama'); ?>
<?php the_author_posts_link(); ?>,<?php the_date($ap_dateTimeFormat); ?> </div>`
But the posts still show "Posted by" and the date. My guess is that it is not even using the page.php to generate it and I'm not sure how to select that as the template. Going through the codex, it looks like it was easy to select a template for each new plate, but I can't find any updated info on how to do it in 2.7.
nickposs
Member
Posted 5 months ago #
Okay, a breakthrough. I finally figured out that I needed to be editing the php files in the Panorama theme directory. I had been editing the ones in root. Already, the above mentioned deletion had the desired effect. I'll keep trying.
nickposs
Member
Posted 5 months ago #
So, editing the page.php in the template directory has the desired effect. I would still really like to be able to select the template while editing the post or page, though. It seems like this was available in earlier Wordpress versions. Am I simply ignoring this option somewhere. I have created a couple of test .php templates to see if that triggers the menu, but no luck.
With Pages you can specify the Template at the time of writing the Page.
On the other hand, the WordPress Template Hierarchy controls what Template is used to display Posts. But you can use a plugin to assign Templates to specific posts:
http://wordpress.org/extend/plugins/custom-post-template/
Related
Pages#Page Templates
nickposs
Member
Posted 5 months ago #
I understand, but there is no drop box for Template in the page editor. Digging around the forum, I found it suggested that you should switch themes and try again. Still, I don't see the menu. My only choices are Parent and Order. When I go into the Appearances-->Editor, all of the custom templates show up and can be edited. I just can't find a way to select them when I'm within the page editor. (Hope that makes sense.)
nickposs
Member
Posted 5 months ago #
Just what I was looking for. Thanks for pointing me in the right direction. (Not sure why that didn't turn up in all of my searches.)
f1mktsol
Member
Posted 3 months ago #
To hide the author info (written by) on the pages (pages only - not post) open the page.php and delete this line:
<?php _e('By','panorama'); ?> <?php the_author_posts_link(); ?>,
Save your changes, and you are done.
smile2life
Member
Posted 1 month ago #
is'nt it any plugin to hid author/date - for those of us that don't master coding and "the holly codes"?