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.

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

Updated 14-Feb-2024: New revised tutorial supports:

  • PHP 8.3 and WordPress 6.4.3 (latest till date)
  • Data-grid 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 with name: [phpgrid-users] so 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:

Next Actions: You can create more snippets a (step3) by copying code from package demos and assign new unique shortcode 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.

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?