---
title: Custom buttons
description: "Option **wpda_buttons_custom** allows plugin users to add standard and custom buttons to a data table. The following advanced settings adds three buttons to my data table. A custom button calling a custom function and two standard buttons with custom labels. The…"
url: "https://docs.legacy.wpdataaccess.com/docs/data-tables-custom-buttons/"
updated: "2025-11-21"
category: "Legacy Tools / Tables / Export & other buttons"
---

# Custom buttons

Option **wpda_buttons_custom** allows plugin users to add standard and custom buttons to a data table. The following advanced settings adds three buttons to my data table. A custom button calling a custom function and two standard buttons with custom labels. The inline demo below shows the result.

```
{
	"dom": "Bfrtip",
	"wpda_buttons_custom": [
		{
			"text": "Custom Button",
			"action": "function ( e, dt, node, config ) { alert('call your own javascript function here'); }"
		},
		{
			"text": "Print selected rows",
			"extend": "print"
		},
		{
			"text": "Export to CSV",
			"extend": "csv"
		}
	]
}
```

## Inline demo

| ID | Gender | Date Of Birth | Firstname | Lastname | Address | Zipcode | City | County | Country | Email | Phone No | Registration Date | Student Wp Username |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ID | Gender | Date Of Birth | Firstname | Lastname | Address | Zipcode | City | County | Country | Email | Phone No | Registration Date | Student Wp Username |

More information about this topic can be found here:

- [jQuery DataTables custom buttons](https://datatables.net/extensions/buttons/custom)

A WP Data Access example can be found here:

- [Code Manager custom button example](https://code-manager.com/code/?wpda_search_column_code_name=Code-Manager-Export)

  Use the Code Manager to add your javascript function to your web page:

- [Add a javascript function with the Code Manager](https://code-manager.com/blog/docs/index/shortcodes/javascript-shortcodes/)

## Button labels

  Button labels are show in uppercase by default. You can change this in your css.

```
.dt-button {
    text-transform: inherit;
}
```

## Note

- Custom buttons are shown in the order in which they are added to the custom button array
