creeaza un shortcode

How to generate a shortcode to display your code

If you have created a PHP function within a plugin or widget created by you, or even directly in functions.php, you can add another default WordPress function called add_shortcode immediately after it is closed. The add_shortcode function has two parameters:

  1. The name you want to use in the shortcode and
  2. The name depending on the content you want to download.

Code example:

 functiion_create_by_you() {
//the content of the function will be entered here
add_shortcode ( 'name' , 'functiion_create_by_you' );