Inline Google Spreadsheet Viewer

Need technical support? Please visit the WordPress Plugin directory for up-to-date information about this plugin. Posting to the Support Forum for Inline Google Spreadsheet Viewer is where you’re more likely to get more help faster, rather than leaving a comment here.

Here are some live examples showing charts, graphs, and tables made with the Inline Google Spreadsheet Viewer that all use this Google Spreadsheet:

The default HTML table displayed by Inline Google Spreadsheet Viewer:

Player
Team
Points
Games
John SmithPirates33
Andrea MillerNinjas62
Nancy GlasskillAliens33
José RodriguezRobots25
Keith McGrawPirates63
Lily RiverrunNinjas26
Kim SettlebackRobots53
Judy DemeterAliens82

A Column chart comparing individual players:

The above column chart is created using the shortcode:

[gdoc
    key="https://docs.google.com/spreadsheets/d/16SrlMkySbxfpxD1zi7ssvZAYkpS1gC91fk2wAl4ngVg/edit"
    title="Points earned and games played, by player"
    chart="Column"
    query="select A, C, D"
]

A Bar chart showing the relative ranking of each team:

The above bar chart is created using the shortcode:

[gdoc
    key="https://docs.google.com/spreadsheets/d/16SrlMkySbxfpxD1zi7ssvZAYkpS1gC91fk2wAl4ngVg/edit"
    title="Team ranking, by total score"
    chart="Bar"
    query="select B, sum(C) group by B order by sum(C)"
]

A Pie chart showing the relative breakdown of points earned by players on the Aliens team:

The above pie chart is created using the shortcode:

[gdoc
    key="https://docs.google.com/spreadsheets/d/16SrlMkySbxfpxD1zi7ssvZAYkpS1gC91fk2wAl4ngVg/edit"
    title="Points scored by Aliens team members, by player"
    chart="Pie"
    query="select A, C where B='Aliens'"
]

You can also set an arbitrary CSV file (or web service endpoint that produces CSV data) to be your datasource. These CSV files can also be query‘ed just like Google Spreadsheets. Here’s what the default DataTables-enhanced view looks like, using an arbitrary CSV file, with a custom query:

The above table was created using the shortcode:

[gdoc
    key="http://viewportsizes.com/devices.csv"
    query="select `Device Name`,`OS Version`,`Release Date` where `Platform`='Android'"
]

Overview of Inline Google Spreadsheet Viewer features

The Inline Google Spreadsheet Viewer readme file contains a thorough overview of its features. A brief summary of those features are below. Please read the readme file for a complete description of all included features.

Easily turn data stored in a Google Spreadsheet into a beautiful interactive chart or graph, a sortable and searchable table, or both!

The Inline Google Spreadsheet Viewer fetches a publicly shared Google Spreadsheet using a [gdoc key=""] WordPress shortcode, then renders it as an HTML table or interactive chart, embedded in your blog post or page. The only required parameter is key, which specifies the document you’d like to retrieve and will render a feature-rich table. Additional parameters let you customize how you display your data in the table, or transforms the table into an interactive bar chart, pie chart, or other information visualization.

Your spreadsheet must be shared using either the “Public on the web” or “Anyone with the link” options. Currently, private Google Spreadsheets or Spreadsheets shared with “Specific people” are not supported.

After setting the appropriate Sharing setting, copy the URL you use to view the Spreadsheet from your browser’s address bar into the shortcode. For example, to display the spreadsheet at https://docs.google.com/spreadsheets/d/ABCDEFG/edit#gid=123456, use the following shortcode in your WordPress post or page:

[gdoc key="https://docs.google.com/spreadsheets/d/ABCDEFG/edit#123456"]

If your spreadsheet uses the “old” Google Spreadsheets, you need to ensure that your spreadsheet is “Published to the Web” and you need to copy only the “key” out of the URL. For instance, if the URL of your old Google Spreadsheet is https://docs.google.com/spreadsheets/pub?key=ABCDEFG, then your shortcode should look like this:

[gdoc key="ABCDEFG"]

To create an interactive chart from your Spreadsheet’s data, use the chart attribute to a supported chart type. These include:

  • Area charts
  • Bar charts
  • Bubble charts
  • Candlestick charts
  • Column charts
  • Combo charts
  • Histogram charts
  • Line charts
  • Pie charts
  • Scatter charts
  • Stepped area charts

For example, if you have a Google Spreadsheet for a sports league that records the goals each team has scored (where the first column is the team name and the second column is their total goals), you can create a bar chart, with an optional title, from that data using a shortcode like this:

[gdoc key="ABCDEFG" chart="Bar" title="Total goals per team"]

To render an HTML table with additional metadata, such as supplying the table’s title, summary, <caption>, and a customized class value, you can do the following:

[gdoc key="ABCDEFG" class="my-sheet" title="Tooltip text displayed on hover" summary="An example spreadsheet, with a summary."]This is the table's caption.[/gdoc]

The above shortcode will produce HTML that looks something like the following:

<table id="igsv-ABCDEFG" class="igsv-table my-sheet" title="Tooltip text displayed on hover" summary="An example spreadsheet, with a summary.">
    <caption>This is the table's caption.</caption>
    <!-- ...rest of table code using spreadsheet data here... -->
</table>

You can also strip a certain number of rows (e.g., strip="3" omits the top 3 rows of the spreadsheet).

For “old” Google Spreadsheets, you can use the gid attribute to fetch data from a worksheet other than the first one (the one on the far left). For example, to display a worksheet published at https://spreadsheets.google.com/pub?key=ABCDEFG&gid=4, use the following shortcode in your WordPress post or page:

[gdoc key="ABCDEFG" gid="4"]

The header_rows attribute lets you specify how many rows should be rendered as the table header. For example, to render a worksheet’s top 3 rows inside the <thead> element, use:

[gdoc key="ABCDEFG" header_rows="3"]

Be default, all tables are progressively enhanced with jQuery DataTables to provide sorting, searching, and pagination functions on the table display itself. If you’d like a specific table not to include this functionality, use the no-datatables class in your shortcode. For instance:

[gdoc key="ABCDEFG" class="no-datatables"]

For DataTables-enhanced tables, you can also specify columns that you’d like to “freeze” when the user scrolls large tables horizontally. To do so, use the FixedColumns-left-N and FixedColumns-right-N classes, where N is the number of columns you’d like to freeze. For instance, to display the three left-most columns and the right-most column in a fixed (frozen) position, use the following in your shortcode:

[gdoc key="ABCDEFG" class="FixedColumns-left-3 FixedColumns-right-1"]

Web addresses and email addresses in your data are turned into links. If this causes problems, you can disable this behavior by specifying no to the linkify attribute in your shortcode. For instance:

[gdoc key="ABCDEFG" linkify="no"]

You can pre-process your Google Spreadsheet before retrieving data from it by passing a Google Charts API Query Language query to the shortcode’s query attribute. This lets you interact with the data in your Google Spreadsheet as though the spreadsheet were a relational database table. For instance, if you wish to display the team that scored the most goals on your website, you might use a shortcode like this to query your Google Spreadsheet and display the highest-scoring team:

[gdoc key="ABCDEFG" query="SELECT team WHERE max(goals)"]

Queries are also useful if your spreadsheet contains complex data from which many different charts can be created, allowing you to select only the parts of your spreadsheet that you’d like to use to compose the interactive chart.

Join the Conversation

107 Comments

  1. Hi,
    I’ve got spreadsheet with merged some cells. Is there any possibility to view them correctly with Your plugin? Already they don’t show merged.

    greetings

  2. I initially had problems as above because instructions are not quite right. Maybe Google changed the interface?

    What you need to do is: In File menu of spreadsheet (ie inside browser window) choose ‘Publish to the web …’ and click ‘Start Publishing’ button.

    I’m not sure whether sharing as described in instructions also needs to be set as ‘Public on the Web’ via Share button top right of spreadsheet. I guess there’s no reason not to.

    Note: I also had problems with a gid which was first created (ie gid=0) but then moved so no longer be left-most. Because of way plugin is scripted, gid=0 is ignored so defaults to left-most tab. Simply re-generated problem tab with another gid to work around.

    Plugin works fine so far with WP3.3 :-)

    Hope this helps. Big thanks to author!

  3. I love this plugin!
    I would like to use it for the tournaments of a tennis school, but the html table i get has no background images of the cell, which i need for displaying the tournament brackets.
    I guess the issue is the theme css…
    Is there a way to override the theme css?
    [i’m not that wordpress/css monster…]

  4. Sorry, delete my previous post..
    now i’ve read of the igsv-table` class adn so on.

    i’ll try and maybe post something less dumb.

    [new_years_eve hangover mode: off]

    ciao!:=)

  5. Hello,

    On my website, fopen is locked by the supplier, so I change your code using wp_remote_get(). I also had to make the csv parser. if you have last php version you can use str_getcsv() otherwise….
    contact me if are interested into this update
    Thanks for your plugin, really usefull !!

    Tinken

  6. Hi Meiter!

    Apologies for starting this with a praise, but I just can’t help it! This plugin makes non-coders look like pros :)

    Nevertheless, a non-coder is still a non-coder.

    I’ve been trying to format the tables using css. I’ve prevailed in formatting the tables one-by-one using .igsv-table..

    However, is there a way I can implement this to all spreadsheets? I’m publishing a huge number of spreadsheets. I can format each table, but too cumbersome.

    Any help?

    thanks

  7. this is probably a stupid question ..but here goes

    i have some conditional formatting in my google doc–basically red or green color based on values above or below zero.

    the colors are obviously getting stripped when send using this plugin.

    Anyone have any creative ideas on how to maintain formatting on the html?

    Thanks!

  8. Hmm..is anyone able to display something other than the first sheet?

    The plugin works perfect when i have a page displaying my first sheet like [gdoc key="*****"]

    but when i try to create another page with [gdoc key="*****" gid="1"] the table displays but is an embedded Google Doc page with a bunch of extra noise from Google.

    Anyone else encountering this?

  9. i want to thx author 4 this plugin and want to help others with adding css to your spreadsheets.

    here is how it looks when you add this css codes: http://dalokaysitesi.org/aidatlar

    if you have trouble with design of your tables,
    add your theme’s style.css theese lines (under wp menu theme editor)

    .igsv-table {
    border-collapse: separate;
    border-spacing: 1px;
    background-color: #CDCDCD;
    margin: 10px 0px 15px 0px;
    font-size: 8pt;
    width: 100%;
    text-align: left;
    }
    .igsv-table th {
    background-color: #E6EEEE;
    border: 1px solid #FFFFFF;
    padding: 4px;
    color: #3D3D3D!important;
    }
    .igsv-table td {
    color: #3D3D3D;
    padding: 4px;
    background-color: #FFFFFF;
    vertical-align: top;
    }
    .igsv-table .even td {
    background-color: #FFFFFF;
    }
    .igsv-table .odd td {
    background-color: #F0F0F6;
    }
    .igsv-table .row-hover tr:hover td {
    background-color: #D0D0D6!important;
    }

  10. Hi, thanks so much for creating this plugin!

    Here’s a test page which uses it (twice):

    http://managedaccountreview.com/offshore-foa/

    I think it looks great (thanks to you!).

    In order for me to get the graph to look like it is part of the same dataset, I created the page by using styled tables to “contain” three elements:

    spreadsheet 1 (upper left info)
    chart (created by jquery)
    spreadsheet 2 (lower, horizontal table)

    To get each spreadsheet to show their data correctly, on google spreadsheets I created mini-sheets such as this one (for the table #2):

    https://docs.google.com/spreadsheet/ccc?key=0Anlq07HbSPGkdGlxN3I1Q1JJV2hUVi1lTEpvSkhSTXc#gid=20

    So… here are my questions:

    1. I want to create different styles for spreadsheet 1 and spreadsheet 2. For example on spreadsheet 1 I want to align column 1 to the left and column 2 to the right. Is a way to modify your php file so that I have two plugins installed: IGSV-A and IGSV-B? This way I could write two sets of the igsv-table css.

    2. Any ideas on how to show negative numbers in red? (see the google spreadsheet which uses conditional formatting).

    3. I also want to eliminate the borders or cell spacing on the upper left spreadsheet but nothing I do seems to solve this. Any suggestions?

    Thanks much!

  11. Again, thanks for this plugin! I love it and use it for every one of my sports related websites. By far the easiest way to to add stats in a “pretty” manner.

    Thanks to Duo for sharing his table styling for everyone to use. I actually liked it so much that I replaced one of my own styles with yours!

    My question, is there a way to display a range of cells. I know the top rows can be stripped, but I am searching for a method to display a range.

    As I mentioned, I have a sports site. I track and list some stats for the entire season. It would be nice if I could keep only one spreadsheet with the days as rows, then display only the most recent rows, rather than create a new spreadsheet for only a small selection of data.

  12. is there a way I can implement this to all spreadsheets? I’m publishing a huge number of spreadsheets. I can format each table, but too cumbersome.

    Seems like you’re on the right track, Nick. I’d suggest you add some CSS to style the .igsv-table class in your WordPress theme’s stylesheet(s) so that all your tables are styled at once. You can then tweak specific tables by targeting their individual key using CSS’s ID selectors. For more detailed information about this, I’d encourage you to buy and read my book on the subject, AdvancED CSS. :)

    i have some conditional formatting in my google doc–basically red or green color based on values above or below zero.

    the colors are obviously getting stripped when send using this plugin.

    Anyone have any creative ideas on how to maintain formatting on the html

    Sadly, Chris, you’ll have to recreate the conditional behaviors using client-side JavaScript, as this plugin doesn’t currently support the features you’re using in Google Spreadsheets. It’d be awesome if it did, one day, though, so feel free to request a feature enhancement on this project’s issue tracker.

    when i try to create another page with [gdoc key="*****" gid="1"] the table displays but is an embedded Google Doc page with a bunch of extra noise from Google.

    Chris, I suggest that you double-check to ensure all of the Google Spreadsheet’s worksheets you want to access have been “published,” not just a range. :)

    1. I want to create different styles for spreadsheet 1 and spreadsheet 2. For example on spreadsheet 1 I want to align column 1 to the left and column 2 to the right. Is a way to modify your php file so that I have two plugins installed: IGSV-A and IGSV-B? This way I could write two sets of the igsv-table css.

    Walter, I don’t see why a second plugin is necessary. Different styles can be applied individually by targeting a table using its key, which becomes a CSS ID. For instance, if you get two tables using shortcodes like [gdoc key="foo"] and [gdoc key="bar"], then you can write CSS selectors like #igsv-foo and #igsv-bar to write styles for each table individually. Styles you want to apply to every table that this plugin produces can be applied with a class selector like .igsv-table.

    My question, is there a way to display a range of cells. I know the top rows can be stripped, but I am searching for a method to display a range.

    As I mentioned, I have a sports site. I track and list some stats for the entire season. It would be nice if I could keep only one spreadsheet with the days as rows, then display only the most recent rows, rather than create a new spreadsheet for only a small selection of data.

    For something like that, Travis, I’d suggest you create a new worksheet on which you create formulas that calculate the results you want to display from the first sheet. If I’m understanding you correctly, this would let you keep full records of your stats but would give you a new sheet with a specific view of the most recent rows.

    I hope this helps y’all, and thanks again for using my plugin. :)

  13. I just updated the plug-in, but it doesn’t show anymore the document.
    With debug enabled I get these 2 errors:

    WARNING: wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php:69 – Invalid argument supplied for foreach()

    WARNING: wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php:81 – Invalid argument supplied for foreach()

  14. HostFat, the last update changed the requirements. Please be certain you’re running the plugin using WordPress 2.7 or higher. If that doesn’t take care of the issue, make sure the Google Spreadsheet you’re embedding is still public (published) and is formatted as you’d expect. The code expects simple CSV output from Google and translates that into a multi-dimensional array, so you’re seeing those warnings because something in the process of getting the data from Google and transforming it into a multi-dimensional array didn’t work.

  15. We are having the same issue as HostFat.. We updated to WordPress 3.3.2 and page turned into nothing but errors.

    Warning: Invalid argument supplied for foreach() in /home/vg008web05/58/16/2901658/web/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 69

    Warning: Invalid argument supplied for foreach() in /home/vg008web05/58/16/2901658/web/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 81

    CODE ON PAGE:

    Feel free to stop in and browse our store, located in Walford, IA. It is only 10 minutes South West of Westdale Mall on Hwy. 151.

    Store Hours:
    Monday – Friday:
    9:00AM – 5:00PM
    Saturday
    9:00AM – 1:00PM.
    Sunday Closed

    100 3rd St North
    Walford, IA 52351

    Email: store@mcbia.com
    Store Phone: (319) 845-2075

    Computers: 
    [gdoc key="0AoJcKMLY1nKXdElITGxvSC1fdU1ZZmtwNGgwcjV3cnc"]

    Laptops:
    [gdoc key="0AoJcKMLY1nKXdDJ1UTBDdnJjZ0poVkJ1UUh0VEY4dGc"]

    Printers:
    [gdoc key="00AoJcKMLY1nKXdFdzbG9aeURQQkxjeDhuRXNtMGhGYkE"]
    All Printers Have Had the Network Card Removed

    Any suggestions would be GREATLY appreciated!

  16. Hi,

    same problem here. One of a sudden I get this weird “Invalid argument supplied for foreach()” error and major parts of my blog are looking veeery strange. I’m running the latest WordPress version and did not change anything to my Google Docs documents. Any idea? Otherwise, is it possible to get hold of the older 0.2-version, which worked like a charm? Would be very grateful.

    Best regards
    Kurt

  17. Huh. I’ve just run the latest version of the plugin through some tests and it all seems perfectly fine to me. I’m not seeing any errors, so I’m at a bit of a loss to explain why you folks are.

    Firstly, though, can you try to run the plugin after de-activating any other plugins currently installed and active on your WordPress installations? While I can’t imagine there’s a conflict of some kind, it’d be good to rule out that possibility early.

    Let me know you’re still seeing errors after de-activating all your other plugins.

    Also, if any of you feel comfortable doing so, I’d be interested in doing some troubleshooting with anyone who has at least some basic PHP knowledge. If that sounds good to you, please let me know via email.

    Meanwhile, you’ll always be able to download the older 0.2 version of the Inline Google Spreadsheet Viewer plugin for WordPress at your convenience.

  18. Hi! Thanks a lot for your quick help! I will do some further testing myself later and let you know, if I could fix the error. My php knowledge is … not existing, though ;-)

  19. how do you enable debug? I had this working just fine last year, but since my site is a summer camp website, I don’t look at it much until this time of year… was planning on digging into the formatting changes and options, today, but suddenly, all the pages where there should be a spreadsheet displayed are kind of blank. I look at the code and there’s a lot of table rows, but no actual content. I checked my spreadsheet and did republish it, just to be sure.

  20. very stragne effects here.

    just installed this freshly on latest version of wp. created a page, added shortcode and pasted key of published (triple-checked) spreadsheet. result: google docs login-screen gets inserted in my page.

    so i switched to another wp-page i’m using this plugin on and copied the shortcode including key of that other spreadsheet over to this very same page. clicked preview – and voila – this other spreadsheet gets displayed. investigating a bit i realized that this other spreadsheet actually is *not* published – still this one gets properly inserted, the other one doesn’t..

    i’m confused now :(

  21. It’s seem google don’t like the fonction wp_remote_get
    And so return a login page

    It’s seem the url is not good.
    For me before it was
    $url = “https://spreadsheets.google.com/pub?key={$options[‘key’]}&output=csv”;

    And now $url = “https://docs.google.com/spreadsheet/ccc?key={$options[‘key’]}&output=csv”;

    It’s possible to change a little the script and use curl fonction to get the csv file but i don’t kow if it’s very good programming.

  22. Hi Meitar,

    Thx for your work. I see that the plugin doesn’t keep conditional formats of the original spreadsheets. Is there any way to solve it?

    And, is there a way to put this code in home.php (not only in pages or posts)?

    Thanks!

  23. Same happened to me, WordPress 3.4.1 but I don’t know when this became a problem.

    Have installed v.0.2 and works again. I think it may be a complicated solution, but thank you all the same!

  24. Hi, im trying to use the plugin on my website but the only thing that shows up is this error log:

    what might be the problem?

    Thank you.

    Warning: Invalid argument supplied for foreach() in /data/web/virtuals/22261/virtual/www/subdom/pokuswp/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 69

    Warning: Invalid argument supplied for foreach() in /data/web/virtuals/22261/virtual/www/subdom/pokuswp/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 81

  25. I love this plugin but it’s not been updated in a while. I’ve made some changes to my version of the plugin. This will print out a useful error to the screen if there is a problem fetching the page instead of just nothing. I was having curl problems and this was what pointed me in the direction to fix them.

    After the line:
    $resp = wp_remote_get($url);

    add this:
    if ( is_wp_error($resp) )
    echo $resp->get_error_message();

    all the code does is say “if there is an error echo it and keep going”. without it the code will just ignore errors.

  26. Finally had time to look back into this and, though I don’t understand why, downgrading to 0.2 fixed this because in that version I’m doing my own CSV parsing. It seems relying on PHP’s built-in str_getcsv() frakked things up. I’ve reverted that part of the code to always relying on my own implementation and this seems to have fixed things in my tests. I issued a new patch release to version 0.3.1 and it should be available in the WordPress plugin repository for you to download soon.

    Please let me know if this change fails to resolve any problems you’re having. Thanks again.

  27. Hello,

    I am having trouble getting any sheet other than the left-most sheet to publish on my webpage.

    For example, here is the second tab’s address: https://docs.google.com/spreadsheet/ccc?key=0Av6fO–q-tdpdDFwNmRzVTB0enpCQWJrUG1wdXM4LWc&hl=en#gid=8

    Here is the shortcode I am using:
    [gdoc key="0Av6fO--q-tdpdDFwNmRzVTB0enpCQWJrUG1wdXM4LWc&output=html" header_rows="2" gid="8"]

    When I open the page, I get nothing at all where the short-code was placed. If I remove the gid=”8″, I get the first tab showing up nicely.

    I checked that all sheets are published. Can you tell me what I am doing wrong?

    Thanks
    Russ

  28. Hi Meitar,
    I just installed v0.4.2 of your plug-in and try to display a spreadsheet using [gdoc key="https://docs.google.com/spreadsheets/d/1d9JYRfZw7Ywc4nV0c7TpHbkTFYEH5z2MNcquiPhHcT8/pubhtml"]

    I get this error:
    Warning: array_splice() expects parameter 1 to be array, null given in /home/heath/public_html/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 81

    Warning: Invalid argument supplied for foreach() in /home/heath/public_html/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 96

    Warning: Invalid argument supplied for foreach() in /home/heath/public_html/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 108

    I know the sheet is published because the google embedder works – I just want some header rows please.
    I am a beginner and don’t know what to do to fix this.
    Thank you for your help
    Betty

  29. Betty, I suggest you try using “the old Google Spreadsheets.” The new spreadsheets from Google that you’re using are not actually supported. See the note in the plugin’s changelog:

    This feature is experimental and is not recommended for production websites because Google’s “new” Google Spreadsheets are still under active development. I strongly suggest you continue to use the “old” Google Spreadsheets for any documents with which you use this plugin. More information about reverting back to the old Google Spreadsheets is available on Google’s help page.

  30. Google spreedsheets has updated and now does not give you the key=”ABCD” code in the url and instead give you a code like d/ABCD which does not work with this plugin right now, is there any way to get it to work?

  31. Hi, looking to adding column filtering capacity to your plugin using datatables but i can’t figure out how to bring datatables javascript in. Could you give me any pointers? I am (obviously) new to the game. Thanks.
    -Leo

  32. Leo, the DataTables JavaScript is included and loaded as part of the plugin (as of version 0.4.4). If you want to act on the table in your own scripts using the DataTables API, you need to do something like this in your script:

    jQuery(window).load(function () {
       var t = jQuery('#igsv-YOUR_TABLE_KEY_HERE').DataTable({'retrieve': true});
       t.order([0, 'desc']).draw(); // Order by first column, descending.
    });

    See the DataTables manual for more information about how to use the DataTables API.

  33. I had a really hard time getting the data to sort using the script above. With some help from Meitar, a co-worker and a lot of trial and error, here’s what worked.

    I added this script to the footer.php of the WordPress theme. I inserted it right at the end of the body so it would load last.

    jQuery(window).load(function () {
    jQuery(‘#igsv-MY_TABLE_KEY’).dataTable().api().order([1, ‘desc’]).draw();
    });

    This sorts my table by the 2nd column, which is what I wanted.

  34. I am interested in removing all the buttons (print, csv, pdf, etc.) and rewriting the labels (e.g., “1 to 1 of 1 entries”) to be in my local language, Hebrew. How is this possible? Thanks!

Leave a comment

Your email address will not be published. Required fields are marked *

You can encrypt your comment so that only Meitar can read it.