My clients should not be able to add or delete rows on their front-end table. I would like to make it so that the editable front-end tables do not show the "New" and "Delete" buttons, but show the other table tools. I would still like to have the add/delete buttons show up on the admin dashboard, just not on the front-end.
I tried adding the following custom CSS through the settings page, but that did not work.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
Also point me to the table ID so I can take a look. Thank you.
I just asked for credentials just to test it out on your side. The issue can be related to the code because of the other theme or some other CSS. I just wanted to login you your site to change that for you and give you the right code.
Can you please just send me the link where I can login. Thank you.
For the future, I recommend sharing those snippets of code on a page that people can find when they google how to get rid of the new/delete buttons. That way, you don't have to answer people like me every time.
I am glad that now everything is working fine. That previous code is working in most of the cases but when something like this occurs the easiest way is to change it thought the customer's site.
You are welcome. We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!
Actually, upon further inspection, there is still a small problem. On the front-end tables, if I click one of the rows, the "Delete" button shows up. I would prefer it to not show up on the front-end at all.
Can you please check now. I accidentally made a mistake when writing CSS, I left the " . " sign in the code. Now everything should work. Please take a look and let me know the result. Thank you.
If this CSS is inserted into the general Settings (as instructed) then it applies to all wpDataTable definitions. However, not all wpDataTable definitions have this requirement. That is, some may require the 'Add' button and/or the 'Delete' button.
Are there any plans to allow these buttons to be selectively disabled at the individual wpDataTable level?
For our future 2.0 update it will be some major changes to backend and you will be able to toggle options to hide or show some features like add, edit, delete, global search, etc.
You can write a custom function for this in your functions.php file and specify the Table id from which you want the button to be removed. Remember this button will aslo be removed from the back-end.
function hide_edit_delete_buttom($object,$table_id){ foreach($object->dataTableParams->buttons as $text => $button){ if(is_array($button)){ $button_type = $button['text']; } if($button_type == 'THE BUTTON TYPE YOU WANT TO HIDE - Delete / Edit / Add )' && $table_id == "THE TABLE'S ID WHERE YOU WANT TO HIDE BUTTON" ) { unset($object->dataTableParams->buttons[$text]); } } return $object; } add_filter('wpdatatables_filter_table_description', 'hide_edit_delete_buttom', 10, 2);
Thank you for sharing your ideas and solutions with us, I will forward this to our lead developer so we can talk about this and maybe use it in future.
Hello,
My clients should not be able to add or delete rows on their front-end table. I would like to make it so that the editable front-end tables do not show the "New" and "Delete" buttons, but show the other table tools. I would still like to have the add/delete buttons show up on the admin dashboard, just not on the front-end.
I tried adding the following custom CSS through the settings page, but that did not work.
div.dataTables_filter { display: none !important; }
/*Hide new button*/
.wpDataTables button.DTTT_button_new { display: none !important; }
/*Hide delete button*/
.wpDataTables button.DTTT_button_delete { display: none !important; }
If this did not work, what will? How can I make these buttons hidden on the front-end, but viewable on the back-end.
Hi probizservices,
Thank you for your purchase.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
Also point me to the table ID so I can take a look.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi probizservices,
I just asked for credentials just to test it out on your side. The issue can be related to the code because of the other theme or some other CSS. I just wanted to login you your site to change that for you and give you the right code.
Can you please just send me the link where I can login.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
HI probizservices,
Can you please take a look now.
The code is in the Custom CSS field in wpdatatables settings page.
Let me know the result.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
That worked! Thank you.
For the future, I recommend sharing those snippets of code on a page that people can find when they google how to get rid of the new/delete buttons. That way, you don't have to answer people like me every time.
Hi probizservices,
I am glad that now everything is working fine.
That previous code is working in most of the cases but when something like this occurs the easiest way is to change it thought the customer's site.
You are welcome.
We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link.
Thanks!
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Actually, upon further inspection, there is still a small problem. On the front-end tables, if I click one of the rows, the "Delete" button shows up. I would prefer it to not show up on the front-end at all.
Hi probizservices
Can you please check now.
I accidentally made a mistake when writing CSS, I left the " . " sign in the code. Now everything should work.
Please take a look and let me know the result.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 have the same requirement as the original poster.
Can you share the CSS that was used to selectively disable the 'Add' button and the 'Delete' button?
If you can selectively disable the print/pdf/excel/etc. buttons from the settings page, why not the add/delete buttons as well?
I was able to find the CSS in another ticket.
If this CSS is inserted into the general Settings (as instructed) then it applies to all wpDataTable definitions. However, not all wpDataTable definitions have this requirement. That is, some may require the 'Add' button and/or the 'Delete' button.
Are there any plans to allow these buttons to be selectively disabled at the individual wpDataTable level?
Hi John,
For our future 2.0 update it will be some major changes to backend and you will be able to toggle options to hide or show some features like add, edit, delete, global search, etc.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
You can write a custom function for this in your functions.php file and specify the Table id from which you want the button to be removed. Remember this button will aslo be removed from the back-end.
function hide_edit_delete_buttom($object,$table_id){
foreach($object->dataTableParams->buttons as $text => $button){
if(is_array($button)){
$button_type = $button['text'];
}
if($button_type == 'THE BUTTON TYPE YOU WANT TO HIDE - Delete / Edit / Add )' && $table_id == "THE TABLE'S ID WHERE YOU WANT TO HIDE BUTTON" )
{
unset($object->dataTableParams->buttons[$text]);
}
}
return $object;
}
add_filter('wpdatatables_filter_table_description', 'hide_edit_delete_buttom', 10, 2);
Hi John,
Thank you for sharing your ideas and solutions with us, I will forward this to our lead developer so we can talk about this and maybe use it in future.
Thank you again.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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