Trying to learn WP plugin development.
Followed all the instructions.
Main php file:
<?php
/**
* Plugin Name: Test 1
* Plugin URI: http://xxxxx.xxx
* Description: xxxxxxxxxxxxxxxxxx
* Version: 1.0.0
* Author: xxxxxxx
* Author URI: http://xxxxxx.xxx
* License: GPL2
*/
My one an only php file with code:
<?php
function testhook() {
$output="<script> alert('Page is loading...'); </script>";
echo $output;
echo 'SOULISSSSSSSSSSSS';
}
add_action( "wp_head", "testhook" );
It simply does nothing. View Source doesnot contain the string anywhere.
Of course i have activated the plugin, cleared caches e.t.c
Obviously my noobness stops me from finding the mistake
Aucun commentaire:
Enregistrer un commentaire