Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Display only post titles and publish date (http://forum.bytesforall.com/showthread.php?t=3105)

vincotek Aug 22, 2009 05:47 PM

Display only post titles and publish date
 
I am trying to achieve the following look on all my category pages;

{mm/dd/yy] Post title

Basically I want to only list posts with the above format with the post title being the link

Is there any way to accomplish this?

Thanks in advance.

Flynn Aug 23, 2009 03:25 PM

At STyle & Edit CENTER COLUMN -> The LOOP

replace

<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>


with

<?php if ( !is_category() ) { ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
<?php } ?>

vincotek Aug 23, 2009 06:08 PM

Thank you Flynn,

Can the Published Date be placed on the same line as the Headline?

Flynn Aug 29, 2009 07:42 AM

PHP Code:

<div style="width:60px;float:left"><?php the_date(); ?></div>
<?php bfa_post_headline('<div style="margin-left:70px" class="post-headline">','</div>'); ?>

To change the date output or to style the date items (year,month,day) differently, use

PHP Code:

<?php $date explode(' 'the_date('M j Y','','',FALSE)); ?>
<div style="width:60px;float:left">
<div class="date-month"><?php echo strtoupper($date[0]); ?></div>
<div class="date-day"><?php echo $date[1]; ?></div>
<div class="date-year"><?php echo $date[2]; ?></div>
</div>
<?php bfa_post_headline('<div style="margin-left:70px" class="post-headline">','</div>'); ?>
<br style="clear:left" />

To vertically align the post headline and the date use a table as a table-less solution will require a whole bunch of extra DIV's.

PHP Code:

<?php $date explode(' 'the_date('M j Y','','',FALSE)); ?>
<table><tr><td>
<div style="width:60px">
<div class="date-month"><?php echo strtoupper($date[0]); ?></div>
<div class="date-day"><?php echo $date[1]; ?></div>
<div class="date-year"><?php echo $date[2]; ?></div>
</div>
</td><td>
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
</td></tr></table>

CSS Insert:

PHP Code:

div.date-month {
....
}
div.date-day {
...
}
div.date-year {
...



vincotek Aug 31, 2009 08:44 AM

Thank you Flynn!

Your answer was well worth a donation for all the great work you do and the support you offer.

mbro Sep 8, 2009 09:03 AM

I am using this amended code - sorry to hi-jack, however I want the post title etc to be central to the page, which before I used this code it was, now it isnt.

I have set the headline options in ATO > Style POSTS & PAGES to text-align=center which was working before using this code.

I currently have in the LOOP

PHP Code:

<?php $date explode(' 'the_date('M j Y','','',FALSE)); ?>
<table align="center"><tr><td>
<div align="center"></div>
<div style="width:60px" align="center">
<div class="date-month"><?php echo ($date[0]); ?></div>
<div class="date-day"><?php echo $date[1]; ?></div>
<div class="date-year"><?php echo $date[2]; ?></div>
</div>
</td><td>
<?php bfa_post_headline('<div class="post-headline" text-align="center">','</div>'); ?>
</td></tr></table>


mbro Sep 8, 2009 09:44 AM

Sorry - sorted it now, am sure most will know how to do it anyway! Apologies for my poor html knowledge! :)

PHP Code:

<p><div align="center"><?php $date explode(' 'the_date('M j Y','','',FALSE)); ?> 
<table align="center"><tr><td>
<div align="center"></div>
<div style="width:60px" align="center">
<div class="date-month"><?php echo ($date[0]); ?></div>
<div class="date-day"><?php echo $date[1]; ?></div>
<div class="date-year"><?php echo $date[2]; ?></div>
</div>
</td><td>
<?php bfa_post_headline('<div class="post-headline" text-align="center">','</div>'); ?>
</div></p></td></tr></table>



All times are GMT -6. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.