hi all,

I am wondering if someone could give me a quick hand with some php im trying to edit in Wordpress.

Heres the original peice I am trying to edit:

<div class='dateauthor'>
            <small class='capsule'><?php the_time('F jS, Y') ?> by <?php the_author() ?> 
	</small>
        </div>

What I want to do is when "the_author" equals "admin" for the div to be hidden or deleted.

I have added this to make sure that it can find admin

<?php if ($author=="admin"){echo "hello24241";} ?>

and edit here...

<?php $author=the_author() ?>

My question I guess would be is there a statement that would be able to hide/delete the div? Or should I be re-writing this code, like this...

<?php $author = the_author(); ?>
<?PHP if ($author=="admin")?> working
<?php else: ?> [B]\* I get an error on this line *\[/B]
        <div class='dateauthor'>
            <small class='capsule'><?php the_time('F jS, Y') ?> by <?php the_author() ?> 
			</small>
        </div>
<?php endif; ?>

Thanks for any help,

and if you need me to be a little more clear just ask,

tian

I apologize as soon as I sent this I remembered I started the thread in wrong are, not sure how to move this but if a mod could delete this ill make new post in php.

Thanks :$

This article has been dead for over six months. Start a new discussion instead.