just a simple PHP question
-
How would be the better way of writing this code:
the aim: the custom post type name should link to blog/custom_post_type
this snippet here works – but how could I do it better?
<?php echo ('<a href="'); $url = get_home_url(); echo $url; echo ('/'); $post_type = get_post_type( $post->ID ); echo $post_type; echo ('">'); echo ('<span style="text-transform: uppercase">'); $post_type = get_post_type( $post->ID ); echo $post_type; echo('</span></a>'); ?>
thanks!
AD
- The topic ‘just a simple PHP question’ is closed to new replies.