Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am getting started with plugin development. I wrote the following program to display text on screen but nothing happened. Please help. Thanks.

<?php
/*
Plugin Name: Fahad
Plugin URI:
Description: Declares a plugin that will be visible in the
WordPress admin interface
Version: 1.0
Author: Yannick Lefebvre
Author URI: http://ylefebvre.ca
License: GPLv2
*/
?>


function fahad(){
    echo "I am alive";
}
add_filter('wp-footer', fahad);
share|improve this question
    
Don't forget to accept the correct/helpful answer. –  Ray Mitchell Sep 17 '12 at 21:48

1 Answer 1

up vote 6 down vote accepted

A subtle difference between your syntax wp-footershould be wp_footer, underscore _ and not hypthen -

add_filter('wp-footer', fahad);   // wrong...

add_filter('wp_footer', 'fahad'); // right..

Follow the naming convention of functions:

share|improve this answer
    
Oh my. Sorry but I should accept it was a stupid mistake by me. –  Fahad Uddin Sep 17 '12 at 18:43
3  
Not really a stupid mistake, just a mistake. It happens and that's what we're here for, to help, so long as the question falls into WPSE guidelines and this does. –  userabuser Sep 17 '12 at 18:45
    
Thanks again for the help. –  Fahad Uddin Sep 19 '12 at 10:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.