Created
April 22, 2014 14:59
-
-
Save jillmugge/11182560 to your computer and use it in GitHub Desktop.
Adding Img from PODS via LB
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 | |
//adding images from Pods to Loopbuddy | |
add_shortcode('jmg_custom_image_before', 'get_custom_field_1'); | |
function get_custom_field_1() { | |
global $post; | |
return '<a href="'.get_post_meta($post->ID, "before_lightbox.guid", true).'" rel="themeblvd_lightbox[before]" title="'.get_post_meta($post->ID, "before_image_title", true).'"><img src="'.get_post_meta($post->ID, "before.guid", true).'" class="before-image"></a>'; | |
} | |
add_shortcode('jmg_custom_image_after', 'get_custom_field_2'); | |
function get_custom_field_2() { | |
global $post; | |
return '<a href="'.get_post_meta($post->ID, "after_lightbox.guid", true).'" rel="themeblvd_lightbox[after]" title="'.get_post_meta($post->ID, "after_image_title", true).'"><img src="' . get_post_meta($post->ID, "after.guid", true) . '" class="after-image"></a>'; | |
} | |
add_shortcode('jmg_custom_image_logo', 'get_custom_field_3'); | |
function get_custom_field_3() { | |
global $post; | |
return '<img src="' . get_post_meta($post->ID, "logo.guid", true) . '" class="client-logo" />'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment