Title: Drupal To WordPress &#8211; VIEWS LISTING
Last modified: December 7, 2016

---

# Drupal To WordPress – VIEWS LISTING

 *  [jcjxxl](https://wordpress.org/support/users/jcjxxl/)
 * (@jcjxxl)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/)
 * I’m new to WordPress. I’m moving over from Drupal (ugh! I’ve had a enough!). 
   I was wondering, is there a way to create a VIEW (this is what it’s called in
   Drupal) that can retrieve data that has been submitted via a webform?
 * EXAMPLE: On my website (Still running Drupal, building a WordPress site in the
   background). people can submit a school listing (name, address, website, etc).
   And when someone goes to the SCHOOL LISTING page it creates a “VIEW” (a page)
   displaying all submitted schools.
 * Are there plugins for this? How does one go about creating this? Is it a widget
   I add to a page?
 * As you can see I am very confused and extremely new to WordPress. Thanks in advance
   for your help.
 * – Jeff

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

 *  [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)
 *  [Davood Denavi](https://wordpress.org/support/users/binarywc/)
 * (@binarywc)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8527281)
 * It sounds to me like you will need to look into using custom post types. Here
   are a couple articles to get you started…
    [https://codex.wordpress.org/Post_Types](https://codex.wordpress.org/Post_Types)
   [http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/](http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/)
 * Personally, I like the WP-Types set of plugins for creating custom post types.
   You can find that here: [https://wp-types.com/](https://wp-types.com/)
 * You will also want to look at Gravity Forms for creating the form on the front
   end. You can find that here: [http://www.gravityforms.com/](http://www.gravityforms.com/)
 * There is one more plugin that might help you for getting the form to save data
   to the custom post type… it is called Gravity Forms + Custom Post Types you can
   find that here: [https://wordpress.org/plugins/gravity-forms-custom-post-types/](https://wordpress.org/plugins/gravity-forms-custom-post-types/)
 * Hope this helps!
 *  [makeonlineshop](https://wordpress.org/support/users/makeonlineshop/)
 * (@makeonlineshop)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8527537)
 * Drupal 8 is a shame. Drupal developers are ridiculous persons who do not know
   how to make an upgrade process easily.
 *  [Davood Denavi](https://wordpress.org/support/users/binarywc/)
 * (@binarywc)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8530206)
 * I agree with [@makeonlineshop](https://wordpress.org/support/users/makeonlineshop/)
   but at the same time Drupal does have its benefits… In any event, we are not 
   here to discuss Drupal and how bad their processes are we are here to help [@jcjxxl](https://wordpress.org/support/users/jcjxxl/).
 * jcjxxl, Please let us know if you have any further questions regarding the custom
   post types.
 *  Thread Starter [jcjxxl](https://wordpress.org/support/users/jcjxxl/)
 * (@jcjxxl)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8589997)
 * Sorry for the late response. Thank you everyone for jumping in and giving me 
   some guidance. Like I said ‘m moving over from Drupal so it’s taking bit of getting
   use to. I’m going to give this a shot. It may be a few days before I get to it,
   but than yo again for the help!
 *  Thread Starter [jcjxxl](https://wordpress.org/support/users/jcjxxl/)
 * (@jcjxxl)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8664432)
 * Life has been busy but I have finally gotten around to the recommendations you
   guys posted. So I have created a new CUSTOM POST TYPE. This is very similar to
   CONTENT TYPE on Drupal. So simple enough for me to understand. I’m tacking on
   a second question to the original. I hope that’s ok.. The two tie together.
 * I’ve created 9 “Custom Post” entries (School 1 info, School 2 Info, School 3 
   info, etc) and now would like to display those custom post entries ONE AT A TIME
   in a widget randomly. So as the visitor goes from one web page to the next there
   would be a widget on each page that would randomly pick one of the CUSTOM POST
   entries and display it. We’re trying to highlight different schools.
 * So although the original question was about creating a full page from form entries(
   Custom Post) I would also like to know how to display ONE randomly chosen custom
   post entry in a widget that sits at the bottom of each page. I hope that makes
   sense. I apologize if I should have opened a second help topic but I felt this
   question ties directly into my original.
 * Thank you again for all of the support. I am really enjoying the process of learning
   WordPress and the support this community has provide so far is great.
 * Thanks again.
 *  Thread Starter [jcjxxl](https://wordpress.org/support/users/jcjxxl/)
 * (@jcjxxl)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8665603)
 * Ok. Disregard my last message. I figured it out.
    After creating my custom post
   type I used a plugin titled “CONTENT WIDGET” that allows you display the content
   of any post type. You can select the number of posts to display, randomize if
   you like,etc.

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

The topic ‘Drupal To WordPress – VIEWS LISTING’ is closed to new replies.

## Tags

 * [drupal migration](https://wordpress.org/support/topic-tag/drupal-migration/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 4 participants
 * Last reply from: [jcjxxl](https://wordpress.org/support/users/jcjxxl/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/drupal-to-wordpress-views-listing/#post-8665603)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
