Codes Not Working Correctly
-
I created several taxonomies and custom metaboxes for my custom posts/templates. However, I’m having a problem with the linking. As you can see here – http://www.booksbytheton.xyz/blogtours/after-loving-you/ under CONNECT – the links aren’t linking correctly and I can’t see why. And before I erased it, the images weren’t either. The links for them (I was trying to link the images to a website) weren’t linking, they were showing up the same way, as a link right before the image, and again, I don’t know why since the coding itself looks okay but I must be missing something.
This is the image code –
<?php if (get_post_meta( $post->ID, 'cmb2_promo2' ) != '') { ?><p><center><a href="<?php echo get_the_term_list($post->ID, 'blogtour', true); ?>" target="_blank"><img src="<?php echo get_post_meta($post->ID, 'cmb2_promo2', true); ?>" alt="$tttitle" title="$tttitle" width="500" border="0"></a></center></p><?php } ?>These are the “connect” codes.
<center><?php if (get_the_term_list( $post->ID, 'website' ) != '') { ?><a href="<?php echo get_the_term_list($post->ID, 'website', true); ?>" target="_blank">WWW</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'amazon' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'amazon', true); ?>" target="_blank">Amazon</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'facebook1' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'facebook1', true); ?>" target="_blank">Facebook</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'facebook2' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'facebook2', true); ?>" target="_blank">Facebook</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'goodreads' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'goodreads', true); ?>" target="_blank">Goodreads</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'instagram' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'instagram', true); ?>" target="_blank">Instagram</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'pinterest' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'pinterest', true); ?>" target="_blank">Pinterest</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'twitter' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'twitter', true); ?>" target="_blank">Twitter</a><?php } ?> <?php if (get_the_term_list( $post->ID, 'news' ) != '') { ?> | <a href="<?php echo get_the_term_list($post->ID, 'news', true); ?>" target="_blank">News</a><?php } ?></center><br />
The topic ‘Codes Not Working Correctly’ is closed to new replies.