Title: Where does the code go?
Last modified: September 29, 2017

---

# Where does the code go?

 *  Resolved [bastienkoert](https://wordpress.org/support/users/bastienkoert/)
 * (@bastienkoert)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/where-does-the-code-go-2/)
 * Hi All,
 * I’ve created a dashboard widget for a plugin that our company wrote. What I can’t
   figure out is where to put that code so that the widget is added to the dashboard.
   What file does this go in? Should it go into the theme’s function.php? Into the
   plugin’s creation file?
 * I’ve read a lot of tutorials and example code, but all seem to show the snippet
   of required code to get the functionality but I can never where to put the code.
 * Thanks,
 * Bastien
    -  This topic was modified 8 years, 8 months ago by [bastienkoert](https://wordpress.org/support/users/bastienkoert/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwhere-does-the-code-go-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [bastienkoert](https://wordpress.org/support/users/bastienkoert/)
 * (@bastienkoert)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/where-does-the-code-go-2/#post-9540659)
 * Placed the code in the plugin’s main file. This now works
    -  This reply was modified 8 years, 8 months ago by [bastienkoert](https://wordpress.org/support/users/bastienkoert/).
      Reason: resolved

Viewing 1 replies (of 1 total)

The topic ‘Where does the code go?’ is closed to new replies.

## Tags

 * [dashboard](https://wordpress.org/support/topic-tag/dashboard/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [bastienkoert](https://wordpress.org/support/users/bastienkoert/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/where-does-the-code-go-2/#post-9540659)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
