Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function customfield_1_shortcode( $atts ) {
- if ( get_post_meta( get_the_ID(), 'customfield1', true ) ) {
- $customfield = get_post_meta( get_the_ID(), 'customfield1', true );
- return "html stuff";
- }
- add_shortcode( 'customfield_1', 'customfield_1_shortcode' );
- function customfield_2_shortcode( $atts ) {
- if ( get_post_meta( get_the_ID(), 'customfield2', true ) ) {
- $customfield = get_post_meta( get_the_ID(), 'customfield2', true );
- return "html stuff";
- }
- add_shortcode( 'customfield_2', 'customfield_2_shortcode' );
- ?>`enter code here`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement