rakeshr

add acf field in contact forms 7

Feb 13th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. function cf7_add_post_id(){
  2.  
  3.     global $post;
  4.     //$enddate=get_field(end_date,$post->ID);
  5.     $startdate=get_field(start_date,$post->ID);
  6.     $sdate=date("d.m.Y",strtotime($startdate));
  7.     return $sdate;
  8.    
  9. }
  10.  
  11. add_shortcode('CF7_ADD_POST_ID', 'cf7_add_post_id');
Add Comment
Please, Sign In to add comment