Title: Using php echo do_shortcode and URL-escaped Sort Order code
Last modified: December 24, 2018

---

# Using php echo do_shortcode and URL-escaped Sort Order code

 *  Resolved [jaydweight](https://wordpress.org/support/users/jaydweight/)
 * (@jaydweight)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/using-php-echo-do_shortcode-and-url-escaped-sort-order-code/)
 * I love this plugin, and I’m learning a ton. Thanks Meitar for all your help.
 * I’m adding my google sheet via php (I’m not fluent- but a beginner for sure) 
   like this:
 * `<?php echo do_shortcode("[gdoc key=ABCDEF]"); ?>`
 * I noticed that when I added html in one column (and yes I did add the ability
   to add html to the table by adding the function in the functions.php file) it
   won’t sort appropriately.
 * So upon further research, and the well written instructions by Meitar, I’ve found
   that I can fix that by editing the above code to this code:
 * `<?php echo do_shortcode("[gdoc key=ABCDEF datatables_order='%5B%5B 2, desc %
   5D%5D']"); ?>`
 * But when I do that, some of the table elements disappear, like the ability to
   search, and have pagination.
 * How can I fix this? And, sorry for not knowing, but I know someone might be able
   to guide me in the right direction. Thanks in advance.
 * _[ [Please do not bump.](https://wordpress.org/support/guidelines/#do-not-bump-posts)]_
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-php-echo-do_shortcode-and-url-escaped-sort-order-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [jaydweight](https://wordpress.org/support/users/jaydweight/)
 * (@jaydweight)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/using-php-echo-do_shortcode-and-url-escaped-sort-order-code/#post-11024128)
 * Okay, I was able to work through it and I figured it out. I simply added `datatables_order
   = 1` and now the html images I’ve added are now showing at the top of the table.
   🙂
 * Oh, and the table elements are there and showing perfectly.

Viewing 1 replies (of 1 total)

The topic ‘Using php echo do_shortcode and URL-escaped Sort Order code’ 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/)

## Tags

 * [sort](https://wordpress.org/support/topic-tag/sort/)
 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 1 reply
 * 1 participant
 * Last reply from: [jaydweight](https://wordpress.org/support/users/jaydweight/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/using-php-echo-do_shortcode-and-url-escaped-sort-order-code/#post-11024128)
 * Status: resolved