Title: merolhack's Replies | WordPress.org

---

# merolhack

  [  ](https://wordpress.org/support/users/merolhack/)

 *   [Profile](https://wordpress.org/support/users/merolhack/)
 *   [Topics Started](https://wordpress.org/support/users/merolhack/topics/)
 *   [Replies Created](https://wordpress.org/support/users/merolhack/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/merolhack/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/merolhack/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/merolhack/engagements/)
 *   [Favorites](https://wordpress.org/support/users/merolhack/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Drupal To WordPress – VIEWS LISTING](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/)
 *  [merolhack](https://wordpress.org/support/users/merolhack/)
 * (@merolhack)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8527152)
 * Drupal 8 is really beautiful… but if you don’t know how to develop a website,
   you can use WordPress.
 * Use **WP_Query** to get the data from the Data base:
    [https://codex.wordpress.org/Class_Reference/WP_Query](https://codex.wordpress.org/Class_Reference/WP_Query)
 * Make a template for the page or single in that you can see the data.
    **Page 
   Templates** [https://developer.wordpress.org/themes/template-files-section/page-templates/](https://developer.wordpress.org/themes/template-files-section/page-templates/)
 * Here is another option to build the Query:
 * Template Tag
 * Just place both functions in your functions.php file. Then adjust the 1st function
   and add your custom table name. Then you need some try/error to get rid of the
   current user ID inside the resulting array (see comment).
 *     ```
       /**
        * Get "Leaders" of the current user
        * @param int $user_id The current users ID
        * @return array $query The leaders
        */
       function wpse50305_get_leaders( $user_id )
       {
           global $wpdb;
   
           return $wpdb->query( $wpdb->prepare(
               "
                   SELECT <code>leader_id</code>, <code>follower_id</code>
                   FROM %s
                       WHERE <code>follower_id</code> = %s
                   ORDERBY <code>leader_id</code> ASC
               ",
               // Edit the table name
               "{$wpdb->prefix}custom_table_name"
               $user_id
           ) );
       }
       ```
   
 * **How to extend WP_Query to include custom table in query?**
    [http://wordpress.stackexchange.com/questions/50305/how-to-extend-wp-query-to-include-custom-table-in-query](http://wordpress.stackexchange.com/questions/50305/how-to-extend-wp-query-to-include-custom-table-in-query)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Google Maps Plugin by Intergeo] Several annoying issues](https://wordpress.org/support/topic/bug-several-annoying-issues/)
 *  [merolhack](https://wordpress.org/support/users/merolhack/)
 * (@merolhack)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/bug-several-annoying-issues/#post-7068733)
 * With: **Version 1.0.2**
 * Warning: include_once(/home/mysite/public_html/amde/wp-content/plugins/intergeo-
   maps/templates/iframe/extra.php): failed to open stream: No such file or directory
   in /home/mysite/public_html/amde/wp-content/plugins/intergeo-maps/templates/iframe/
   form.php on line 32
 * Warning: include_once(): Failed opening ‘/home/mysite/public_html/amde/wp-content/
   plugins/intergeo-maps/templates/iframe/extra.php’ for inclusion (include_path
   =’.:/usr/lib/php:/usr/local/lib/php’) in /home/mysite/public_html/amde/wp-content/
   plugins/intergeo-maps/templates/iframe/form.php on line 32

Viewing 2 replies - 1 through 2 (of 2 total)