<?php /** * Plugin Name:user info * Plugin URI: http://wordpress_aprai.org * Description: this plugin will be display data from database you can use this shortcode any where * Author:Arunendra Pratap rai */ function display() { global $wpdb; $sql ="select * from `first_projectposts` where `post_type` = 'DisplayPost'"; $query = $wpdb->get_results($sql); echo '
id | first name | Last name | email id | Password |
---|---|---|---|---|
'.$id.' | '.$fname.' | '.$lname.' | '.$email.' | '.$pass.' |
[short_code] In template use:-
<?php echo do_shortcode('[short_code]') ?>
No comments:
Post a Comment