2 edb Feb 01, 2009 00:27

Hi blogmeister,
Find something like this:
$Item->issue_date( array(
'before' => ' ',
'after' => ' ',
'date_format' => '#',
) );
or post_date_if_modified()
and wrap it in an if statement:
if( $Item->ptyp_ID != '5001' )
{
... here comes that code for the date
}
Good luck
SEE HOW THAT WORKS!
Someone smart comes along and *pow* instant code.
:)
Afwas wrote:
and wrap it in an if statement:
if( $ptyp_ID != '5001' ) { ... here comes that code for the date }
Good luck
Thank you guys. EdB, you were right!
Afwas,
Thanks for that code. In purple_beauty, it would be $Item->ptyp_ID.
Q: Is there a function that formats text in the same font and attributes as the date e.g. with the 'before' and 'after' tags, etc.? :?: I want to put something else in its place.
Thanks.
blogmeister wrote:
Afwas,
Thanks for that code. In purple_beauty, it would be $Item->ptyp_ID.
That would be true in any skin ;)
blogmeister wrote:
Q: Is there a function that formats text in the same font and attributes as the date e.g. with the 'before' and 'after' tags, etc.? :?: I want to put something else in its place.
Thanks.
Do that in css, copy the css for the date and add it to .bPost
Thanks for your reply, Afwas.
As you suggested, I went to the css and saw '.bPost h2 {...}' so what I did was add an 'else' to the 'if' statement
else
{
echo "<h2>Sticky Post</h2>";
}
and it works nicely.
Thanks for the idea.
Ya know, Afwas, I actually forgot I added the color a few days ago using that same code in the thread you reference. OOPS. Oh well, its all complete now and looks GOOD!
Good work on this feature!
Thanks again.
This will be a feature included in the upcoming 3.0.1 release
Good. I, too believe it should be a standard option in the package. ;)
I'm pretty sure all "stickypost" does is make sure one post gets on top no matter what the age. That means your post loop is the same post loop for stickies as for ... slippies? To hack something like this in will be very skillful, but it can be done. I do not have the stickypost hack in front of me, but basically it would be like this: In the portion of your post loop that includes a date (or time) feature you would want to wrap that in a conditional statement that means "if this is not the stickypost post-type then include the following bit, else don't do it".
HOPEFULLY someone who has enjoyed adding the stickypost hack will be able to flesh out some details on this. Like maybe a real code sample!
Best of luck to you on this, though honestly I think all you need is a nudge in the right direction :)