Support » Plugins » Custom function -> plugin

  • Resolved briansol


    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?


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



    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.

    Plugin Name: blah plugin
    Plugin URI:
    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.

    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.