Can I embed a table in a php generated WP page? How complicated is this to do? I have seen the do_shortcode thing but that seems to be only a solution for template files. Correct me if I am wrong.
I am hoping to not have to make my own database editor and yours seems to be the cleanest and easiest to use for WP.
I am sorry, but I don't quite understand what you're asking. Could you please explain in a bit more detail?
We are using generated shortcodes to display tables in front end, can you please give me some more info on that PHP page you're creating? Is it related to WordPress?
Do I need to edit this line, add it, or comment out?
The ENQUEUE is part of WordPress? I am trying to find documentation.
Is there a reason I can't grant permission to edit data should I so choose? I realize as a default that would be logical but there are times you might want a contributor to edit data. Or maybe the 'owner' of the data. Maybe the data is unimportant data.
You can try the following, but you will need some experience with writing SQL queries and using WP hooks.
You can create table with query for example
SELECT
user_id,
user_name,
user_address,
CONCAT('<a href="http:/yoursite.com/your_custom_page?user_id=',user_id,'">Details</a>') AS Details
FROM your_table_name
and then on your_custom_page you will insert shortcode of the tableid that you need with placeholder like this
[wpdatatable id=1 var1=1]
of course, you will create that second table from query like
SELECT * FROM second_table WHERE user_id = %VAR1%
and then you will use our hook for dynamic upsetting placeholders
function updateVAR1($tableID){ global $wdtVar1;
//check is set GET parametar user_id
if(isset($_GET['user_id'])){
//get value from form fieald
$wdtVar1 = $_GET['user_id'];
} }
add_action('wpdatatables_before_get_table_metadata', 'updateVAR1');
Like this I believe you will get result like you need
Can I embed a table in a php generated WP page? How complicated is this to do? I have seen the do_shortcode thing but that seems to be only a solution for template files. Correct me if I am wrong.
I am hoping to not have to make my own database editor and yours seems to be the cleanest and easiest to use for WP.
Hi John.
Thank you for your interest in our plugin.
I am sorry, but I don't quite understand what you're asking. Could you please explain in a bit more detail?
We are using generated shortcodes to display tables in front end, can you please give me some more info on that PHP page you're creating? Is it related to WordPress?
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
In a Wordpress php file:
if (isset ($wp_query->query_vars['account']) {
//insert the wpdatatable ID=11
} else {
//insert the wpdatatable ID=10
}
I can only find a reference to using do_shortcode for wpdatatable working in the theme files. I cannot find a reference to using it in a plug-in file.
Hi again John.
You could copy the entire HTML which has been rendered for our table and then use the ENQUEUE to include all scripts rendered on the page manually.
Then, you will need to comment wp-content/plugins/wpdatatables/controllers/wdt_ajax_actions.php around line 11:
and it should work like this.
Please let me know if this works.
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Do I need to edit this line, add it, or comment out?
The ENQUEUE is part of WordPress? I am trying to find documentation.
Is there a reason I can't grant permission to edit data should I so choose? I realize as a default that would be logical but there are times you might want a contributor to edit data. Or maybe the 'owner' of the data. Maybe the data is unimportant data.
Hi John.
Just comment out the line of code.
Yeah, wp_enqueue_script is WordPress's script. You can read more about that here.
However, if you enable editing for your table, you can assign roles that will be able to edit the table (see attachment). Would this help you out?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I found this and wondered if there was an example of this being implemented. This looks like what I am trying to do.
Hi again John
You can try the following, but you will need some experience with writing SQL queries and using WP hooks.
You can create table with query for example
and then on your_custom_page you will insert shortcode of the tableid that you need with placeholder like this
[wpdatatable id=1 var1=1]
of course, you will create that second table from query like
SELECT * FROM second_table WHERE user_id = %VAR1%
and then you will use our hook for dynamic upsetting placeholders
Like this I believe you will get result like you need
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables