Guest User

Untitled

a guest
Feb 1st, 2018
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function page_output_vc_shortcode() {
  2.  
  3. $pagecontent = '';
  4. $arg = array('page_id'=>'');
  5. $the_query = new WP_Query($arg);
  6.  
  7. while ($the_query->have_posts()) : $the_query->the_post();
  8.  
  9. $title = the_title();
  10.  
  11. $pagecontent = '<h2 class="widgettitle">'.$title.'</h2>';
  12. $pagecontent .= the_content();
  13.  
  14. endwhile;
  15.  
  16. return $pagecontent;
  17. }
  18.  
  19. add_shortcode('my_vc_page_output', 'page_output_vc_shortcode');
Add Comment
Please, Sign In to add comment