Remove date on pages and posts
I'm trying to remove pages on posts and pages on the Montezuma Theme (1.1.3).
I'm not too savvy with code, but I really like the theme and am trying to figure out how to remove the date. Can anyone help? Please...thanks! |
look thru the theme options
|
Hi,
Can you please be a bit more specific. I have and I can't seem to find anything. |
In the theme option look at the postformat.php in "Sub Templates".
|
Ah, I see it. Can you tell me exactly what code I am supposed to remove?
Thanks so much for your help! This is what i see: <div id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?>> <h2> <span class="post-format"></span> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a> <?php bfa_comments_popup_link( '0', '1', '%' ); ?> </h2> <?php bfa_thumb( 620, 180, true, '<div class="thumb-shadow"><div class="post-thumb">', '</div></div>' ); ?> <div class="post-bodycopy cf"> <div class="post-date"> <p class="post-month"><?php the_time( 'M' ); ?></p> <p class="post-day"><?php the_time( 'j' ); ?></p> <p class="post-year"><?php the_time( 'Y' ); ?></p> </div> <?php bfa_excerpt( 55, ' ...' ); ?> </div> <div class="post-footer"> <a class="post-readmore" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php _e( 'read more →', 'montezuma' ); ?></a> <p class="post-categories"><?php the_category( ' · ' ); ?></p> <?php the_tags( '<p class="post-tags">', '', '</p>' ); ?> </div> </div> |
take a look of that code and tell me what part you think has to do with the date.
|
So I removed:
<div class="post-date"> <p class="post-month"><?php the_time( 'M' ); ?></p> <p class="post-day"><?php the_time( 'j' ); ?></p> <p class="post-year"><?php the_time( 'Y' ); ?></p> </div> and it didn't work. I then went back in and did something wrong and had to access my database to restore wordpress (thanks to youtube video). Did I take out too much? Not enough? |
that is exactly the code you should have taken out. (good job, pat your self on the back)
What did you do that was wrong causing you to need a db restore? What is the url? did you have a caching plugin active? |
Sorry for getting into the conversation but this topic proved to be very helpful to me. I had also a problem with a cashing plugin and every time I was making changes I had to log out and login again in order to take effect.
What I would like to do is remove the date in the beginning of the article but put it in the end. In the beginning my code was like this <div class="post-bodycopy cf"> <div class="post-date"> <p class="post-month"><?php the_time( 'M' ); ?></p> <p class="post-day"><?php the_time( 'j' ); ?></p> <p class="post-year"><?php the_time( 'Y' ); ?></p> </div> <?php bfa_excerpt( 55, ' ...' ); ?> </div> <div class="post-footer"> <a class="post-readmore" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php _e( 'read more →', 'montezuma' ); ?></a> <p class="post-categories"><?php the_category( ' · ' ); ?></p> <?php the_tags( '<p class="post-tags">', '', '</p>' ); ?> </div> Should I do it like this? Or else where should I put the date text? </div> <div class="post-bodycopy cf"> <?php bfa_excerpt( 55, ' ...' ); ?> </div> <div class="post-date"> <p class="post-month"><?php the_time( 'M' ); ?></p> <p class="post-day"><?php the_time( 'j' ); ?></p> <p class="post-year"><?php the_time( 'Y' ); ?></p> </div> <div class="post-footer"> <a class="post-readmore" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php _e( 'read more →', 'montezuma' ); ?></a> <p class="post-categories"><?php the_category( ' · ' ); ?></p> <?php the_tags( '<p class="post-tags">', '', '</p>' ); ?> </div> </div> Thanks a lot |
why don't you try it and report back?
|
But this way I noticed that we can remove the date from the articles on main page and not in the article. What I am interested to do is put the date inside the article at the end of it.
|
the 'index.php' is used when looking at a multi post page. The 'single.php' is used when looking at a single post page.
|
Thanks a lot once again for your quick replies. The thing is that I still do not know how I can put the date of the post in the end of it.
|
ok you have to understand how the WordPress hierarchy works and how this relates to Montezuma.
on a multi post page, index.php is run and it calls postformat.php when a single post is displayed, it calls single.php when a page is displayed, it calls page.php so if you want to change the location for single posts and pages, you have to modify both single.php and page.php. I hope this helps, now play with things, move some code around and remember is you really mess a template up, you can always press the button to reset that template (don't accidentally press the 'Reset all' button because that will reset everything. |
All times are GMT -6. The time now is 07:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.