Title: Custom function -&gt; plugin
Last modified: August 18, 2016

---

# Custom function -> plugin

 *  Resolved [briansol](https://wordpress.org/support/users/briansol/)
 * (@briansol)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/custom-function-gt-plugin/)
 * Hi all,
 * I’ve created a custom function called
    the_archive_content() which is a derivative
   of the_content() in the post-template.php file that i built to display a summary
   and not to print ads based on my custom id system.
 * It works fine… but i just ran into an issue with an upgrade from 2.2.1 to to 
   2.2.2.
 * Without thinking, i just uploaded the files, and thus it over-wrote my funtion.
 * I had a back up, so no biggie.
 * But, going forward, this is going to be an issue, so i’d like to convert it to
   something (hopefully a plugin) so i don’t have to worry about this again.
 * My custom them calls the new function name, so i just need a place to put it,
   really.
 * Whats the best way to do this?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/custom-function-gt-plugin/#post-609697)
 * the best way to create a plugin? follow the directions?
 * if you can write a function, you can write a plugin, and its all in the documentation.
 *     ```
       <?php
       /*
       Plugin Name: blah plugin
       Plugin URI: http://www.blah.com
       Description: blah blah..
       Author: blah
       Version: 1.0
       Author URI: blah
       */
       function my_function() {
       ..
       echo 'blah';
       }
       ```
   
 * then just call the function in your theme file — just like you have been doing.
 *  Thread Starter [briansol](https://wordpress.org/support/users/briansol/)
 * (@briansol)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/custom-function-gt-plugin/#post-609713)
 * Easy enough. Thanks, i got it all sorted out now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom function -> plugin’ is closed to new replies.

## Tags

 * [custom function](https://wordpress.org/support/topic-tag/custom-function/)

 * 2 replies
 * 2 participants
 * Last reply from: [briansol](https://wordpress.org/support/users/briansol/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/custom-function-gt-plugin/#post-609713)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
