Desarrollo web

Wordpress custom admin table from database with pagination

Categorías: 

Etiquetas: 

Objective

  • Create a custom table with data from a database sql query, with sort and pagination, in WordPress admin panel.
  • Step 1: create a custom menu link to access a new page for the table
  • Step 2: create callback function for the menu link, prepare data input for pagination, sort and print form + table
  • Note: this should be improved to use full WordPress advantages of wp_list_table

Step 1: create a custom menu link to access a new page for the table

Wordpress make your own plugin multilingual

Categorías: 

Etiquetas: 

Summary

  • Step 1: make some string in your plugin translatable
  • Step 2: load the function with add_action 'init' in your plugin
  • Step 3: create folder and file for translations inside your plugin
  • Step 4: update your language files with poedit

In the example, we are going to translate the plugin to Spanish.

Páginas

Subscribe to Desarrollo web