kala-tamin Creating custom tags for Wordpress


Creating custom tags for Wordpress



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!




Twenty Ten, dropdown menu appearing with fade effect

1:



Word press geo location posts?
$result = msql_query ("SELECT * FROM $table_name WHERE id = $type"); 
Should be:.
how to search in wordpress from the database mysql
$result = $wpdb->query("SELECT * FROM $table_name WHERE id = $type"); 
I do not think your "msql_query" is connected or open..
sexy bookmark plugin breaks my site in ie6
You should change it and use the $wpdb->query() or better yet $wpdb->get_results().
difficulty with japanese character encoding in wordpress
You should look into this class that Wordpress automatically creates for you.


Editors for different parts of Wordpress
Extremely helpful!.
how can i use ugly slugs in wordpress using non-western character?


Looking For a “Camera Flash” like Page Transition


78 out of 100 based on 53 user ratings 578 reviews