This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $key = get_post_meta($post->ID, 'your-key', true) ? get_post_meta($post->ID, 'your-key', true) : 'No Key, try again!'; | |
| echo $key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if(get_post_meta($post->ID, 'designed-by')){ | |
| ?><li class="designer">Designed by: <?php | |
| echo get_post_meta($post->ID, 'designed-by', $single = true); | |
| ?></li><?php | |
| } ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if( get_post_meta( get_the_ID(), 'diww_sponsored', true ) == 'sponsored' ) { | |
| if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'giveaway' ) { | |
| $sponsored_content = '<p class="sponsored">This is a sponsored giveaway.</p>'; | |
| $sponsored_content .= $content; | |
| return $sponsored_content; | |
| } | |
| if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'review' ) { | |
| $sponsored_content = '<p class="sponsored">This is a sponsored review.</p>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $contact_name = get_post_meta(get_the_ID(), 'secondary-contact-name', true); | |
| if(!empty($contact_name)): | |
| ?> | |
| <dt>Secondary contact</dt> | |
| <dd><?php echo apply_filters('the_content', $contact_name); ?></dd> | |
| <dd><?php echo apply_filters('the_content', get_post_meta(get_the_ID(), 'secondary-contact-phone', true)); ?></dd> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if(get_post_meta($post->ID, "video_embed", $single = true) != ""){ ?> | |
| <div class="video"><?php echo get_post_meta($post->ID, "video_embed", TRUE); ?></div> | |
| <?php } else { ?> | |
| <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail('primary', array('class' => 'shadow')); ?></a> | |
| <?php } ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $post; | |
| $text = get_post_meta( $post->ID, '_cmb_test_text', true ); | |
| echo $text; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Show WP-PostRatings dislikes for a post | |
| * | |
| * For use with a +1 and -1 system | |
| * | |
| */ | |
| function ac_get_post_dislikes() { | |
| global $post; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_custom_coins_title($coinsTitle) | |
| { | |
| global $post; | |
| $affiliation = get_post_meta($post->ID, 'affiliation', true); | |
| $issue = get_post_meta($post->ID, 'issue', true); | |
| $volume = get_post_meta($post->ID, 'volume', true); | |
| $pub_date = get_post_meta($post->ID, 'pub_date', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function heat_twitter_card(){ | |
| $title = get_post_meta(get_queried_object_id(), 'Title', true); | |
| $description = get_post_meta(get_queried_object_id(), 'Description', true); | |
| $image = get_the_image(array('format'=>'array')); ?> | |
| <!--Twitter Card--> | |
| <meta name="twitter:card" content="summary"> | |
| <meta name="twitter:site" content="@marcheatley"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // print the blog thumbnail | |
| function print_blog_thumbnail( $post_id, $item_size ) { | |
| if( empty($item_size) ){ return ''; } | |
| $thumbnail_types = get_post_meta( $post_id, 'post-option-thumbnail-types', true); | |
| if( $thumbnail_types == "Image" || empty($thumbnail_types) ){ | |
| $thumbnail_id = get_post_thumbnail_id( $post_id ); | |
| $thumbnail = wp_get_attachment_image_src( $thumbnail_id , $item_size ); | |
| $alt_text = get_post_meta($thumbnail_id , '_wp_attachment_image_alt', true); |