hiding text in wordpress

pileofcrap

New member
Oct 17, 2006
569
2
0
Atlanta, GA
So I finally found a problem that has me stumped and as usual the Wordpress community is useless.

I'm making author profiles for my writers and using Extended User Fields to add custom info.

So I have this:
PHP:
        <dt>Founded</dt>
        <dd><?php echo $curauth->founded; ?></dd>
Of course the echo doesn't appear if no data is filled out but I would also like to hide the bolder Founded at the top if no data is entered in the Founded field.

Can anyone help me out?
 


I don't understand why the value isn't hidden by default. Wordpress can be finicky. Maybe you should try a pre-made solution? Here is a cool plugin: search for author-box-reloaded-pack
 
Replace with:

Code:
<?php
if($curauth->founded) echo '<dt>Founded</dt><dd>' . $curauth->founded . '</dd>';
?>
 
Rage9 - is on the money with his solution. I played around with it on my blog. There is also a more indepth discussion about the very same issue on wpquestionsdotcom. Since I can't post links, should you be interested search for the article "custom post type authors page".
 
Rage9 - is on the money with his solution. I played around with it on my blog. There is also a more indepth discussion about the very same issue on wpquestionsdotcom. Since I can't post links, should you be interested search for the article "custom post type authors page".

Of course it works, it's simply PHP. Don't ask non programmers something that takes programmer knowledge. If they couldn't understand how to answer your questions they are morons or simply typical wordpress users that have no interest of knowing how wordpress actually works.