Hello
I'm creating a plugin for wordpress that'll require a couple of custom template tags for theming purposes.
At the moment I have this function:
function gs_subscribe_button ($type) {
echo "alert";
global $wpdb;
$table_name = $wpdb->prefix . "subscription_types";
$result = msql_query ("SELECT * FROM $table_name WHERE id = $type");
while ($row = mysql_fetch_array($result)) {
print_r($row);
}
}
Which I assumed I could call from the theme template as with any core template tag. I know the file this function is in is being called as echo statements work outside functions.
However I can't seem to get any prints or echos from within the function. This is how I'm calling the function:
<?php gs_subscribe_button ("1"); ?>
Just incase thats wrong somehow.
solved it myself. Typo in the function!