---
title: "DataTables Views can&#8217;t be displayed using echo do_shortcode functions"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview-pro/datatables/datatables-views-cant-be-displayed-using-echo-doshortcode-functions/"
---

If you are trying to call the ` [gravityview]` shortcode inside a theme template file by using the `echo do_shortcode` PHP functions, like in the example below, it won't work:

```

echo do_shortcode('[gravityview id="12"]');
```

```

echo do_shortcode('[gravityview id="12"]');
```

 The reason is that the [DataTables library](https://datatables.net/) heavily relies on Ajax requests (and other javascript methods) to load entries on the table.