Forum Replies Created

Viewing 1 replies (of 1 total)
  • Your code totally worked for me. I appreciate you posting the code. Hope you figured out what was going wrong.

    $thepdcode = get_post_meta($post->ID, 'pdcode', true);
                      if ($thepdcode){
                      	?><div style="padding-bottom:20px;"><?php
                      	$pattern = '/[a-zA-Z]/';
                      	//preg_match($pattern, $meta)
                        if (preg_match($pattern, $thepdcode)){
                        	print "<!-- pd wp shortcode -->";
                        	echo do_shortcode($thepdcode);
                        } else {
                          //pdcode: incorrect syntax
                        }
                        ?></div><?php
                      } else {
                      	//pdcode: missing
                      }
Viewing 1 replies (of 1 total)