When a shortcode is inserted in a WordPress post or page, it is replaced with some other content. In other words, we instruct WordPress to find the macro that is in square brackets ([]) and replace it with the appropriate dynamic content, which is produced by a PHP function
My purpose install wp-recaptcha is to avoid spam comments on web, but it’s seems this plugins read error about the filter. When i reply comments from wordpress dashboard it always come to be spam.
Hmmmm…is there any other way?
Prior to 3.1, whenever we did a database query, and we wanted to limit the results to only posts tagged with “garden”, we were fine. But what if we wanted to display only posts tagged with “garden” AND categorized under “nature”. Well, we were out of luck.
But no more.
Setting it up is pretty simple. There is a new query_posts() parameter called “tax_query”.
tax_query is a new query function, which is really and array of arrays that specifies what to pull out of the database. Since that is a bit hard to understand by itself an example is probably helpful
Off course we all known that there’s lot tutorial and discussion about taxonomies and meta box, and from that i learned. And now i’m trying to create an album video of youtube for my client. Thats why i use taxonomies for author and album then meta box for Youtube ID. And this code is just for reminder of me because i have kind of sortem memory loss, hehe.
add_action('init', 'Narasumber');
function Narasumber() {
register_taxonomy(
'Narasumber',
'post',
array(
'hierarchical' => false,
'labels' => array(
'name' => __( 'Narasumber' ),
'singular_name' => __( 'Narasumber' ),
'search_items' => __( 'Search Narasumber' ),
'popular_items' => __( 'Popular Narasumber' ),
'all_items' => __( 'All Narasumber' ),
'edit_item' => __( 'Edit Narasumber' ),
'update_item' => __( 'Update Narasumber' ),
'add_new_item' => __( 'Add Narasumber' ),
'new_item_name' => __( 'New Narasumber' ),
'menu_name' => __( 'Narasumber' ),
'parent_item' => __('Parent Narasumber'),
'parent_item_colon' => __('Parent Narasumber:')
),
'query_var' => true,
'rewrite' => array('slug' => 'narasumber')
)
);
}
add_action('init', 'Album');
function Album() {
register_taxonomy(
'Album',
'post',
array(
'hierarchical' => false,
'labels' => array(
'name' => __( 'Album' ),
'singular_name' => __( 'Album' ),
'search_items' => __( 'Search Album' ),
'popular_items' => __( 'Popular Album' ),
'all_items' => __( 'All Album' ),
'edit_item' => __( 'Edit Album' ),
'update_item' => __( 'Update Album' ),
'add_new_item' => __( 'Add Album' ),
'new_item_name' => __( 'New Album' ),
'menu_name' => __( 'Album' ),
'parent_item' => __('Parent Album'),
'parent_item_colon' => __('Parent Album:')
),
'query_var' => true,
'rewrite' => array('slug' => 'album')
)
);
}
add_action("admin_init", "YoutubeID_init");
add_action('save_post', 'save_YoutubeID_info');
function YoutubeID_init(){
add_meta_box("YoutubeID-meta", "Youtube ID", "YoutubeID_meta_options", "post", "normal", "high");
}
function YoutubeID_meta_options(){
global $post;
$meta_info = get_post_custom($post->ID);
$YoutubeID = $meta_info["YoutubeID"][0];
echo '
Youtube ID here, example http://www.youtube.com/watch?v=i-MD3beQPwM :
';
}
function save_YoutubeID_info(){
global $post;
update_post_meta($post->ID, "YoutubeID", $_POST["YoutubeID"]);
}
And this is the preview.

WordPress Constants
There a few helpful constants defined in WordPress for theme developers. TEMPLATEPATH is defined as get_template_directory(), and STYLESHEETPATH is defined as get_stylesheet_directory().
The function call and the constant are actually interchangeable with each other, but by using the constants (TEMPLATEPATH & STYLESHEETPATH) rather than the functions each time, you’ll reduce the amount of database queries and speed up your site.
TEMPLATEPATH
This returns the path to the template files of a theme. If a child theme is activated, this path will still point to the parent theme. An example path would be “/var/www/html/mysite/wp-content/themes/parenttheme”. You would most likely use this call to include a file. Example code in the functions.php file:
require_once(TEMPLATEPATH . '/extensions/theme-options.php');bloginfo(‘template_directory’);
bloginfo(‘template_directory’) returns the URL of the template directory. An example of this would be “http://mysite.com/multisite1/wp-content/themes/parenttheme”. This could be used to call a stylesheet or an image file. If a child theme is activated, this still returns the parent template directory. Example code in the header.php file:
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_directory'); ?>/css/ie6.css" /><![endif]-->STYLESHEETPATH
This returns the stylesheet path to the template files of a theme. If a child theme is activated, this path will point to the child theme directory. An example path would be “/var/www/html/mysite/wp-content/themes/childtheme”. You would most likely use this call to include a file that you are sure is present in a child theme, or to check if it is. Example code in the functions.php file:
require_once(STYLESHEETPATH . '/extensions/theme-options.php');get_bloginfo(‘stylesheet_directory’)
bloginfo(‘stylesheet_directory’) returns the URL of the child template directory. An example of this would be “http://mysite.com/multisite1/wp-content/themes/childtheme”. This could be used to call a stylesheet or an image file in a child theme. Example code in the header.php file:
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie6.css" /><![endif]-->Define Your Own Constants
If your theme required a lot of calls to get_bloginfo(‘stylesheet_directory’), you should define this as a new constant to reduce database calls and make your code easier to read. To do this, place the following snippet in your functions.php file (it works in child themes as well):
define('STYLESHEET_DIR', get_bloginfo('stylesheet_directory'));To retrieve the URL, you can use this anywhere in your theme:
<?php echo STYLESHEET_DIR; ?>The idea here is to give readers the ability to navigate around your site. You want organized content. You want content that’s linked together in meaningful ways. Custom taxonomies allow us to group our content in ways that simple categories and tags can’t
When we design our blogs, we tend to forget our visitors/users who’re following us with their feed readers. In this tutorial, we’re going to learn to “hack” our blog’s feed for a better feed reading experience for our users.
you create an invoice from you WordPress installation’s admin section, an email with a brief invoice description and a unique link is sent to your client. Your client follows the special link to your blog’s where their invoice is automatically displayed for them. After reviewing the invoice, your client pays their bill using a credit card or PayPal account, and you are immediately notified.
