<?php if (get_post_meta($post->ID, "Author Name") != "") { ?> <font style="text-transform: uppercase;font-size:10px;"> <?php echo get_post_meta($post->ID, "Author Name", true); ?></font> <?php } else { <?php echo get_the_author(); ?> } ?> I'm trying to display author s name on my wordpress blog ! When meta Author name is not available , i want to display the author who publish it ...
<?php echo get_the_author(); ?> If i remove <?php , ?> the author name is not displaying ... if i insert <?php , ?> , its showing error....
<?php if (get_post_meta($post->ID, "Author Name") != "") { ?> <font style="text-transform: uppercase;font-size:10px;"> <?php echo get_post_meta($post->ID, "Author Name", true); ?></font> <?php } else { echo get_the_author(); } ?> PHP: