•  
Posts Tagged ‘functions’

Add a shortcode

By Austin On April 15, 2009 No Comments

This is a simple one.

/** * Your Blog title * */ function my_blog_title() { $blogname = get_bloginfo('name'); return '<span class="blog-title">' . $blogname . '</span>'; } add_shortcode('blog-title', 'my_blog_title');

Just add this to your functions.php file and then add [blog-title] in any post or page and it will return your Blog Title. :) Click here to continue reading



Adding a favicon to your site

By Austin On April 2, 2009 6 Comments

Looking to add a favicon to you site?

Inside your WordPress theme’s functions file (functions.php) add the following to inside your PHP code.

/** * FAVICON * @WPCult.com */ function my_favicon() { ?> <link rel="shortcut icon" href="<?php echo bloginfo("stylesheet_directory") ?>'/images/favicon.ico" /> <?php } add_action('wp_head', 'my_favicon');

That’s it, just be sure to upload an icon image or a .gif/.png. Be sure to correct the target location id the file is located somewhere else. Click here to continue reading



Add additional meta boxes to Hybrid Theme

By Austin On March 27, 2009 7 Comments

At the time of writing this post I have Theme Hybrid as my parent theme, and am using a custom version of Hybrid News that Justin Tadlock offers to the public.

Well I want to tell you how you can add additional custom meta boxes to your child theme’s running the Hybrid Theme.

In your child function.php file just add the following to create a new post meta box:

/** * Add additional post meta boxes * * by WPCult */ function wpcult_post_meta_boxes($meta_boxes) { $meta_boxes['image'] = array( 'name' => 'image', 'default' => '', 'title' => __('Image:'), 'type' => 'text', 'show_description' => false, 'description' => __('PleaseClick here to continue reading


Fixing plugins not compatible with hybrid 0.4.2

By Austin On February 26, 2009 No Comments

Hey everyone, as you may have noticed I have a running on the site. While everything almost everything moved over smoothly, there was an issue with how my parent theme striped text in typography. This caused some plugins, like cformsII to not be allowed to print to the screen. Justin had helped to find a fix to filter the hybrid_typography function.

Originally this function filtered out and changed some text that would not validate as XHTML. This had to be removed by

Click here to continue reading