As popularity of WordPress is growing really fast, we’ve published a new simplified tutorial on how to integrate Grid 4 PHP Framework with WordPress Sites. WordPress misses a comprehensive Editable Table, DataGrid and a CRUD solution, so we’ve integrated it to solve the problem.

It allows using all features of our Data Grid inside WordPress and much simpler than previous implementations. Steps required to integrate are following:

Updated 30-July-2024: New revised tutorial supports:

  • PHP 8.3 and WordPress 6.4.3
  • DataGrid custom event handlers as well.

Step1: Download Free version or Buy package from our website (if not already done) and move “lib” folder from package in your WordPress root directory, and rename “lib” folder as “phpgrid”

and inside this folder the contents should be:

Step2: Install WordPress plugin “Code Snippets” from wordpress.org/plugins/code-snippets/ OR download from Github Repository and install manually.

Step3: Goto admin panel and click Add Snippet as in image. Add any title you like and in code section, copy paste this Sample Snippet Grid Code in code section shown below:

Step4: In this code, we have created a shortcode here same as class name: [phpgrid_users] and we will now place it on page where we want to show our Datagrid.

Result: Now Save the page and open / preview it, you will get the Datagrid.


Adding Grid in WordPress Admin Area
:

Following steps will be required to make shortcode available in admin area – plugin development.

Step1: Add admin_init & admin_footer hook along with others.

Step2: Select ‘Run Snippet everywhere’ after snippet code block.

Step3: Call do_shortcode() function where you want to show datagrid.

Result:

You can create more snippets by copying code from package demos and assign new unique class name for each grid which can be placed on your page/post of WordPress.

Let us know your feedback. If you have any questions, contact our support center.

Next Actions:

Active License Subscription customers can get free upgrade using this link.

How useful was this post?

Click on a star to rate it!

Average rating 4.1 / 5. Vote count: 9

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?