help with action hooks
-
i am working on an existing theme i have made, and im trying to clean it up a bit code wise, by adding action hooks etc.
most are fine, but i am trying to add a feature to my post options where you can input image/video/download locations and they will display in a table under the content.
i have another hook which works fine in this location, but this ones being a bit awkward.
it will display the table, but the table is empty, could someone point out where i am going wrong.
<?php function post_thumbs() { ?> <table cellspacing="0" cellpadding="10px" border="0" width="100%"> <tr> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_1', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_1', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_1', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_2', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_2', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_2', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_3', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_3', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_3', true); ?>" /></a><?php } else { ?><?php } ?></td> </tr> <tr> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_4', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_4', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_4', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_5', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_5', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_5', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_6', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_6', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_6', true); ?>" /></a><?php } else { ?><?php } ?></td> </tr> <tr> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_7', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_7', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_7', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_8', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_8', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_8', true); ?>" /></a><?php } else { ?><?php } ?></td> <td width="33%"><?php if(get_post_meta($post->ID, 'thumbnail_9', true)) { ?><a href="<?php echo get_post_meta($post->ID, 'thumbnail_9', true); ?>" rel="shadowbox[<?php echo $post->ID ?>]"><img class="pthumb" src="<?php echo get_post_meta($post->ID, 'thumbnail_9', true); ?>" /></a><?php } else { ?><?php } ?></td> </tr> </table> <center> <?php echo get_post_meta($post->ID, 'video_embed_1', true); ?> <?php echo get_post_meta($post->ID, 'video_embed_2', true); ?> <?php echo get_post_meta($post->ID, 'video_embed_3', true); ?> </center> <?php if(get_post_meta($post->ID, 'file', true)) { ?> <a href="<?php echo get_post_meta($post->ID, 'file', true); ?>"><h4 class="file">Download File</h4></a> <?php } else { ?> <?php } ?> <?php } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘help with action hooks’ is closed to new replies.