Title: query only column 1
Last modified: August 31, 2016

---

# query only column 1

 *  Resolved [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/)
 * Is this possible to query only column 1?
 * [https://wordpress.org/plugins/inline-google-spreadsheet-viewer/](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/query-only-column-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/query-only-column-1/page/2/?output_format=md)

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7105879)
 * `query="select A"` will do that.
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7105946)
 * thank you kindly =)
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106067)
 * I query column A but then column B doesnt show.
 * I would like the search box to look for only terms in column A
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106070)
 * > I query column A but then column B doesnt show.
   > I would like the search box to look for only terms in column A
 * You’re confusing the Google API with the DataTables API.
 * Use [DataTables’s `columns.searchable` option](https://datatables.net/reference/option/columns.searchable)
   to specify which columns to include in a DataTables search.
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106071)
 * var table = $(‘#example’).DataTable();
 * // #column3_search is a <input type=”text”> element
    $(‘#column3_search’).on(‘
   keyup’, function () { table .columns( 3 ) .search( this.value ) .draw(); } );
 * I see that, but unsure how to taylor it to your plugin
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106072)
 * You want to use the `datatables_columns` attribute. From [the FAQ](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/faq/):
 * > **How do I change the default settings, like can I turn paging off? Can I change
   > the page length? Can I change the sort order?**
   > All of [these DataTables options](https://datatables.net/reference/option/)
   > are accessible through shortcode attributes. The shortcode attribute is an 
   > underscore-separated version of the DataTables’s CamelCase’ed option name, 
   > prefixed with `datatables_`.
 * Since the option you’re looking for is a property set in the DataTables API’s`
   columns` object, you will need to write a JSON object in the `datatables_columns`
   attribute of the shortcode declaring the values for the properties of the DataTables
   API that you’re using.
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106073)
 * wow, that is a large undertaking. Thank you though
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106074)
 * $(‘#example’).dataTable( {
    “columnDefs”: [ { “searchable”: false, “targets”:
   0 } ] } );
 * this one?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106075)
 * > that is a large undertaking.
 * Not really…?
 * No, it’s not as easy as point-and-click. And it probably should be, but I haven’t
   written that code yet. I probably won’t write that code for a long time because
   this is free software and very few people invest in it, y’know?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106076)
 * I’ll show you an example:
 * `[gdoc key="ABCDEFG" datatables_column_defs='%5B { "searchable": false, "targets":
   0 } %5D']`
 * This shortcode is the equivalent of [the `.dataTable()` call you posted](https://wordpress.org/support/topic/query-only-column-1?replies=10#post-8110123).
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106077)
 * i tried something like this datatables_search_columns=”A”
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106078)
 * [http://www.lostshoebox.com/gazetteer-bavaria/](http://www.lostshoebox.com/gazetteer-bavaria/)
 * I did try but it’s still not choosing only column A
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106079)
 * > I did try but it’s still not choosing only column A
 * That’s because `datatables_column_defs='%5B { "searchable": false, "targets":
   0 } %5D'` makes column A (target 0) _not_ searchable, as implied by `"searchable":
   false`, obviously. Read the friendly manual. I already linked you to it.
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106080)
 * Ok, it’s making sense. I thank you kindly for your help =)
 * thank you for the direction
 *  Thread Starter [uculture](https://wordpress.org/support/users/uculture/)
 * (@uculture)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/#post-7106081)
 * would multiple targets looks like this?
 * datatables_column_defs=’%5B { “searchable”: false, “targets”: 1, 2, 3, 4 } %5D’

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/query-only-column-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/query-only-column-1/page/2/?output_format=md)

The topic ‘query only column 1’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

 * 20 replies
 * 2 participants
 * Last reply from: [uculture](https://wordpress.org/support/users/uculture/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/query-only-column-1/page/2/#post-7106086)
 * Status: resolved