WordCult Theme release 0.3
I’ve had some time the last few days while my XPS computer has been having difficulties and the Dell replacement parts didn’t fix, what I know now to be a faulty LCD screen.
So I’ve made a few updates and changes to my WordCult theme. The new version is: 0.3.
Download it:
WordCult Theme 0.3.1.1 - () Version-0.3.1.1 _(350)
Update for 0.3:
A lot of changes to the core files, many files have been changed, removed and moved. So please if upgrading, backup your database. The core folder has been changed from wordcult2 to
Click here to continue readingAdd a shortcode
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.
Adding a external file after the first post
How might you display a Google ad after the first post or anything you like? It is very simple. You just need to add the variable $loopcounter in the Loop. If the $loopcounter is less than or equal to 1, then include your option. Check out the code:
<?php if (have_posts()) : while (have_posts()) : the_post(); $loopcounter++; ?> // your loop <?php if ($loopcounter <= 1) { include (STYLESHEETPATH . '/you-file.php'); } ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?>Pretty simple huh. Well in the $loopcounter line, you may change the include to point to any file or maybe
Click here to continue readingA simple way to query posts
Here is a simple way to call query_posts with an array of options. For all options you my use visit: WordPress Codex.
<?php $my_query = array('showposts' => 4, 'post__not_in' => $do_not_duplicate); ?> <?php query_posts($my_query); ?> Click here to continue readingAdding a favicon to your site
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 readingThe launch of WordPress 2.8
Wow, have you heard? WordPress has announced that the newest version, 2.8 which was thought to be held off till September has actually been a secret project. They have announced that WP 2.8 has already been worked on and will be available today!
Just in case..
Did you realize this was a April fools joke? Hopefully you weren’t to fooled, mine wasn’t as cruel as a few other out there in the web.
WPLover: On Launching a WordPress theme
I just came across this article over at WPLover. Was very good, especially since I just released my first WordPress theme. Seems like he’s got it down to a science, or at least a simple checklist.
Click here to continue readingSo you’ve completed your next great WordPress theme. You’ve tested them day and night, squashing bugs and CSS inconsistencies along the way. Your fingers are trembling, waiting for the time to release that theme to the wild.
Maintenance release for Hybrid 0.5
Today has released an update to his Hybrid Theme. Version 0.5.1 can be found at the WordPress theme repository.
Click here to continue readingUsing the swekey on your blog
If you’ve downloaded the Swekey plugin and plan on using it for users to login here is what you might see.
The first image here shows what a user might see if and when you’ve got “allow registers” and said user has a Swekey plugged into there computer while registering to your site. I registered on a test blog I use, once I typed in my user name and email this
Click here to continue readingApril’s new meetup location for LAWPUG
Anyone in the Los Angeles area? Well the first Sunday of the month is the LAWPUG, and since the weather is nice in LA, the meet is going to be held at the farmers marking on 3rd. For more info head over to LAWPUG.org.
Click here to continue readingSwekey: A safe web enabler usb?
I received a Swekey in the mail this week. What’s a Swekey you ask?
Like regular keys protect your car and your home against thieves and burglars, the swekey protects your internet accounts against any kind of piracy
Any swekey protected web site will never accept to log you in if your swekey is not plugged into your computer… Read more
So I am going to start off by stating that there is a WordPress plugin to enable this handy little USB
Click here to continue readingAdd additional meta boxes to Hybrid Theme
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 readingSick of images being to large for the content area?
Have you ever uploaded an image that might have been a tad bigger than the width of your content area? I know I have! So here is a little CSS fix to handle these situations.
Resize those large images using CSS
.post img { max-width: 600px; height: auto; }That’s it, really simple huh. Just make sure that you change the .post to the correct body class(which starts with a “.“) or body ID(which starts with a “#“).
Would you like a quick explanation?
The CSS is just
And the winners who receive a free book are.

See, I really did pull the winner out of a hat, lol. Well In my post “Get a copy of Blog Blazers” I said that two people would win copies. Well I’ve got a third now, so I know only a few people commented so, the chances are far greater that you could win! On with the show.
The three commentors that have won a copy of Blog Blazers are:
Click here to continue readingHow to: Display RSS feeds from anywhere
Here is a simple way to display any RSS feed in your WordPress blog.
<?php include_once(ABSPATH . WPINC . '/rss.php'); $rss = fetch_rss('http://feeds2.feedburner.com/WPCult'); $items = array_slice($rss->items, 0, 4); if (empty($items)) echo '<li>No items</li>'; else foreach ( $items as $item ) : ?> <a style="font-size: 14px;" href='<?php echo $item['link']; ?>' title='<?php echo $item['title']; ?>'><?php echo $item['title']; ?></a><br /> <p style="font-size: 10px; color: #aaa;"><?php echo date('F, j Y',strtotime($item['pubdate'])); ?></p> <p><?php echo substr($item['summary'],0,strpos($item['summary'], "This is aClick here to continue reading
