Title: Custom code plugin does not work
Last modified: December 20, 2020

---

# Custom code plugin does not work

 *  [pablodelgadoflores](https://wordpress.org/support/users/lk2_89/)
 * (@lk2_89)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/custom-code-plugin-does-not-work/)
 * I usually create a custom function plugin in the webs I make so as not to overload
   the site with plugins when what I need is something simple.
 * I’m starting a new site and my plugin doesn’t work. However, I put the code in
   the functions.php of the Astra theme if it loads.
 * Why? I tried something simple to confirm that it doesn’t work and this code:
 *     ```
       <?php
   
       function saludar(){
           echo "Hola";
       }
   
       add_action('astra_entry_after','saludar', 10, 3 );
       ```
   
 * Creating it in the personal plugin does not work and pasting it in the functions.
   php does.

Viewing 1 replies (of 1 total)

 *  [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * (@brainstormteam)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/custom-code-plugin-does-not-work/#post-13822677)
 * Hi [@lk2_89](https://wordpress.org/support/users/lk2_89/),
 * I tried to create a site-specific plugin by following [this article](https://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/),
   added in your code and it worked on my end. Please try following the article 
   and see if it also work for you.
 * I hope it will help.
 * Kind regards,
    Herman 🙂

Viewing 1 replies (of 1 total)

The topic ‘Custom code plugin does not work’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.4/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/custom-code-plugin-does-not-work/#post-13822677)
 * Status: not resolved