7/3/2008 ↓

  • Parent Child Themes

    I didn’t know these existed, but apparently you can assign a child theme to a parent theme. A child theme inherits all the template files of the parent theme except for the style.css file and functions.php, which take precedence over the original. Ian Stewart of Themeshaper.com published a post ( Functions.php WordPress Child Themes ) which goes into detail on how to redesign your blog the smart way basing the work off of a theme framework. I’m still not sure about the usage of parent-child themes so any help you guys/gals could give me would be appreciated. (10)

5/29/2008 ↓

Removing Width/Height from the Image Uploader 30comments

Thanks for visiting! If you're new here, you may want to subscribe to our RSS feed. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. Go ahead, subscribe to our feed! You can also receive updates from this blog via email.

Reader Vivien writes in:

Is there a way to prevent WordPress from inserting the width and the height for images in the new 2.5 media manager?

In short, yes, but it requires you to insert some code into your theme’s functions.php file.

Fortunately, there is a WordPress filter we can use called image_downsize, which takes in three arguments (a boolean, an attachment ID, and a size string).

add_filter('image_downsize', 'my_image_downsize',1,3);

All I’m doing in the above filter is setting the filter name, the function to call (my_image_downsize), what priority I want the filter, and how many arguments the function takes.

From there, I mimic the function image_downsize in the ‘wp-includes/media.php’ file, but do not return a width or a height. As a result, when the image is sent to the editor, no width or height is present.

function my_image_downsize($value = false,$id = 0, $size = "medium") {
	if ( !wp_attachment_is_image($id) )
		return false;
	$img_url = wp_get_attachment_url($id);
	//Mimic functionality in image_downsize function in wp-includes/media.php
	if ( $intermediate = image_get_intermediate_size($id, $size) ) {
		$img_url = str_replace(basename($img_url), $intermediate['file'], $img_url);
	}
	elseif ( $size == 'thumbnail' ) {
		// fall back to the old thumbnail
		if ( $thumb_file = wp_get_attachment_thumb_file() && $info = getimagesize($thumb_file) ) {
			$img_url = str_replace(basename($img_url), basename($thumb_file), $img_url);
		}
	}
	if ( $img_url)
		return array($img_url, 0, 0);
	return false;
}

Download the Code

Here is a sample functions.php file of the code presented in this article.

I also used Andrew’s plugin generator to quickly put together a plugin that I will creatively call No Image Width or Height (download link). It will accomplish the same thing for those not comfortable with code. Just unzip, place in your WordPress plugin’s folder, and activate.

Thanks Vivien for the interesting question.

5/23/2008 ↓

Create Your Own Frontpage Slideshow 16comments

Author: Jeff Chandler Category: HOW-TO, Web Design, Weblog Add-Ons

The folks over at PerfectSurf.de have published a tutorial which goes into detail on how you can create your own personal slideshow to appear on the frontpage of your WordPress powered site. This slideshow feature has been seen in numerous premium themes as of late and now you can create one for yourself via this tutorial. A slideshow is great for showcasing images within a gallery or showing off images related to top news items on your blog. The tutorial is not meant for beginners, but those of you who understand terms such as The Loop, excerpt and permalink, you should be fine.

There are some caveats to this process which are outlined in the requirements:

There are many ways of embedding slideshows to your website. This tutorial is based on a Wordpress 2.5 installation (with some files customized and of course all files updated that were critical in WP2.5 concerning security issues!). Moreover you need to BUY a plugin that was originally developed for “Joomla!”, which is an open source Content Management System (CMS). The plugin is called “frontpage slideshow version 1.6? (FPSS) and it was transformed by its creators into a so called “static version” that fits into ALL websites that are PHP-based.

After going through the tutorial, you’ll notice that you need to change the slideshow file manually in order to update the content the links within the slideshow point to. This seems like a mundane approach. I believe this can be done via custom fields but I’d like to know what other ways this effect can be accomplished without having to purchase anything and without having to manually update the slideshow?

*NOTE* Tobi of the perfectsurf website left a note in the comments regarding this post:

No need to buy the FPSS anymore. I made a new plugin out of Jason Schuller’s FCG plugin, I called it FCS (Featured Category Slideshow) You find everythin at perfectsurf.de/category/fcs (by now, take the first post)

5/11/2008 ↓

Theme Designers And Print.CSS 30comments

Here at WeblogToolsCollection, we see quite a bit of WordPress theme releases coming through our inbox and I’ve noticed a trend. Hardly any of them include printing support. The question I’d like to have answered is why? Is adding printer support to WordPress themes too hard? Does adding this feature take up time? Or is it that this feature is barely any use to anyone?

For those wanting to add this type of support to your theme, you can install WP-Print. WP-Print picks up where most theme authors have left off by providing printing support in such a way that end users can print either articles or comments, depending on how you have configured the plugin.

In fact, doing a search on the plugin database for the keyword of “print” brought up two pages worth of search results. Another solution for you theme authors out there is called Bunny’s Print CSS. This plugin provides two files, print-css.php which is the plugin file and print.css which is the print stylesheet.

A link to the print stylesheet will be placed in your theme’s header, providing it uses the wp_head() function/hook. An admin panel is added to the Presentations menu and it will allow you to edit the stylesheet if you make print.css writeable. You probably want to edit the stylesheet provided to your liking, though it will hopefully do most of the job if your theme is sandbox-based.

This method takes most of the hard work out of creating a print.css file, even though theme authors would most likely have to modify the stylesheet to make it compatible with their theme.

For those who would like to manually create the style sheet, there is an article on the Codex entitled “Styling For Print” which covers all of the basics necessary to make a pretty, yet functional print stylesheet to include with your theme/themes.

I hope that by linking to the Codex article and bringing this issue to light, we will start to see more themes being released with built in printing support. It’s not a deal breaker for me, but I’d rather see themes that support this feature than those that don’t. My personal opinion is that, printing support is a nice finishing touch to round off any theme, and having it built in allows me and a number of other users to stop using another plugin.

Now it’s time for you to sound off. Is this a trivial issue, or is there anyone else out there that would like to see this feature in more themes?

5/2/2008 ↓

WordPress Theme Releases For 5/1 10comments

One Column Themes

TJ-Clean

TJ Clean WP Theme

TJ Clean is a simple, clean cut yet feature-full WordPress theme which is great for sites where content is king. Ideal for personal blogs as it includes integration with Flickr (photo sharing), Last.FM (music sharing) and status updates from Facebook/Twitter (and others). This theme is also XHTML Strict 1.0 and Valid CSS 2.1.

Two Column Themes

30April

30April WP Theme

30April was created by the theme author to celebrate his birthday. This theme contains widget support, is fixed width, contains an extra footer, theme options to make changing and editing the theme easy and built in gravatar support.

Milky Conversations

Milky Conversations WP Theme

Milky Conversations is a two column, widget ready theme that is based off of the White As Milk theme, written by Azeem Azeez. The theme has been released under GPL and is fully compliant with the license. As the name implies, this theme is pretty white with black text and a little bit of orange thrown in via the RSS icons.

Three Column Themes

Khaki Traveler

Khaki Traveler WP Theme

Khaki Traveler was developed by Jeremy Clarke. It has a tan color scheme and a travel themed header. It is also a three column widget ready theme. It has gravatar support as well as tagging support. It has a top navigation menu with an easy to access log-in form.

Hybrid Themes - Themes Where The Number Of Columns Can Be Configured

Choice

Choice WP Theme

Choice is a highly configurable theme that supports either 2 or 3 columns, is widgetized, theme options to control the themes background color, theme text weight, theme heading color, number of sidebars and whether or not your slogan appears. The theme also has native tag support.

4/13/2008 ↓

How to Only Retrieve Posts With Custom Fields 23comments

Author: Ronald Huereca Category: HOW-TO, WordPress, WordPress Hack

One question I come across a lot regarding custom fields is how to only retrieve posts based on a custom field.

For example, if a post has a custom field of “MyData”, someone might want to only retrieve that particular post.

The WordPress Codex has a technique for retrieving posts based on custom fields, which consists of writing your own query and going through the results.

The technique in the Codex is good, but I’ve found a re-usable way one can retrieve only posts with certain custom fields.

The technique I use makes use of two custom functions placed in a theme’s “functions.php” and a custom WordPress Loop.

Let’s get started — The “functions.php” file

First, let’s place the two custom functions in the “functions.php” file. This file should be in your theme directory, but if it isn’t there, you can create one using any text editor.

Here are the two functions below:

function get_custom_field_posts_join($join) {
	global $wpdb, $customFields;
	return $join . "  JOIN $wpdb->postmeta postmeta ON (postmeta.post_id = $wpdb->posts.ID and postmeta.meta_key in ($customFields)) ";
}
function get_custom_field_posts_group($group) {
	global $wpdb;
	$group .= " $wpdb->posts.ID ";
	return $group;
}

The function “get_custom_field_posts_join” makes use of an advanced WordPress filter called “posts_join“. Each time posts are called, you can add on extra MySQL parameters using filters. In this case, I add on an option to find certain postmeta. Please note the use of a global variable called “customFields“, which I’ll explain a bit later.

The function “get_custom_field_posts_group” makes use of another advanced WordPress filter called “posts_group“. This is used to avoid duplicate entries in our return query.

Now Let’s Work on Our Loop

After the two functions are placed in the “functions.php” file, it’s time to work on placing the appropriate code into one of our template files.

For this example, I’ll be modifying the “sidebar.php” file in the WordPress default theme. You could place the below code in any of your theme files, however.

<?php /* Begin Custom Field Posts */ ?>
<h2>Custom Posts</h2>
<ul>
<?php
global $customFields;
$customFields = "'Links', 'MyData'"; //Comma seperated 's1', 's2', 's3'

The first part of the code deals with establishing the structure of the output. You really could do anything you want here.

Please note the use of the global variable “customFields“. What we’re doing here is setting up a comma-separated variable that will be used to search for our custom fields. The “customFields” variable is used in the “get_custom_field_posts_join” function.

In this example, it is assumed we want to find posts with custom fields of “Links” and “MyData“.

Custom Fields - Links and MyData
Custom Fields - Links and MyData

The next bit of code instantiates a new instance of WP_Query and runs a query to return some posts.

$customPosts = new WP_Query();
add_filter('posts_join', 'get_custom_field_posts_join');
add_filter('posts_groupby', 'get_custom_field_posts_group');
$customPosts->query('showposts=5' );//Uses same parameters as query_posts
remove_filter('posts_join', 'get_custom_field_posts_join');
remove_filter('posts_groupby', 'get_custom_field_posts_group');

Note the use of the “add_filter” and “remove_filter” functions. Since we are doing a post query, we can tap into the query and add our own parameters. So before the query is initiated, two query-type filters are added, and after the query is initiated, the two filters are deactivated since we only want them run once.

This last bit of code initiates our custom loop, gets the custom values, spits them out, and ends the loop.

while ($customPosts->have_posts()) : $customPosts->the_post();
$links = get_post_custom_values("Links");
$data =  get_post_custom_values("MyData");
?>
<li><a href='<?php echo $links[0]; ?>'><?php echo $data[0]; ?></a></li>
<?php endwhile; ?>
</ul>
<?php /* End Custom Field Posts */ ?>

The “get_post_custom_values” WordPress function returns an array of matching keys. It’s assumed there is only one key per post, which is why we echo out the first value (Ex: echo $links[0]).

The Full Post Code

Here is the full post code. The only thing you need to change for your own use is the custom fields needed (change the customFields text) and what type of output is desired within our custom loop.

<?php /* Begin Custom Field Posts */ ?>
<h2>Custom Posts</h2>
<ul>
<?php
global $customFields;
$customFields = "'Links', 'MyData'"; //Comma seperated 's1', 's2', 's3'
$customPosts = new WP_Query();
add_filter('posts_join', 'get_custom_field_posts_join');
add_filter('posts_groupby', 'get_custom_field_posts_group');
$customPosts->query('showposts=5' );//Uses same parameters as query_posts
remove_filter('posts_join', 'get_custom_field_posts_join');
remove_filter('posts_groupby', 'get_custom_field_posts_group');
while ($customPosts->have_posts()) : $customPosts->the_post();
$links = get_post_custom_values("Links");
$data =  get_post_custom_values("MyData");
?>
<li><a href='<?php echo $links[0]; ?>'><?php echo $data[0]; ?></a></li>
<?php endwhile; ?>
</ul>
<?php /* End Custom Field Posts */ ?>

Custom Field Output
Custom Field Output

Downloadable Code

The full code mentioned in this post is available for download. Within the “zip” file are a sample “functions.php” and “sidebar.php“.

Conclusion

With the above technique, you can do some pretty fancy stuff. For example, you can only retrieve posts with custom images for a nice magazine effect.

If you have any questions regarding the code, I’ll do my best to answer them in the comments.

2/29/2008 ↓

Interview With WPThemerKit 8comments

WPThemerKit.com is a new way to create WordPress themes. The system works similarly to the way cssZenGarden works in that, you have an HTML file and a CSS file. Once you are finished with the design, you copy the CSS file along with the images folder to the corresponding WordPress blank theme and all of a sudden, you have a full blown WordPress Theme. I managed to get a hold of the creator behind WPThemerKit and asked him a few questions regarding his project.

Jeff - First off Cal, please tell us a little bit about yourself.
Cal - I am a web developer and entrepreneur. I don’t really specialize in any one area, but would consider CSS one of my stronger areas. I’ve been developing websites since around 2003 and really enjoy using content management systems like WordPress. Most of my time is spent playing with PHP scripts or content management systems and trying to come up with ideas for websites that sound like fun.

Jeff - What inspired you to create the WP Theme Kit?
Cal - In a word, frustration. I’ve tried making themes for Joomla, e107, MODx and WordPress. WordPress was by far the easiest but there was still a learning curve. In the beginning I was going to create the kit only for myself. I had just started making WordPress themes and wanted to speed up the process. After a few realizations I concluded that one long HTML file with all the components of a WordPress theme could be substituted for the actual theme. At first I thought I could just use FireFox and “View Source” the HTML and copy/paste into Dreamweaver. It turned out to be a little more difficult than that but I got it worked out eventually.

Jeff - Can you explain in the simplest form possible on how the themer kit works?
Cal - The HTML file (which I call the HTML blank) is like the entire WordPress theme. It has the comment form, comments, tags, a header menu, the whole 9 yards. So all you have to do is edit the CSS stylesheet in your favorite editor. The HTML file is just there so you can preview it in your browser and see the changes. Once you’re finished modifying the CSS file, you simply copy it and the images folder to the corresponding WordPress blank. The WordPress blank is basically just a WordPress theme without any CSS stylesheet, it has all the necessary PHP files, but no style.

Jeff - What sort of ways are you looking to expand upon the original Theme Kit?
Cal - In the beginning I’m just looking for feedback and ways to improve the kit. Eventually though I’d like to see kits available for software like BBPress. The neat part is that you can use the same CSS framework across different software. This will allow you to create a WordPress theme with the themer kit, then move the CSS file to a blank BBPress theme (prepped like the WP blanks) and be 80% done, only left to style a few areas. What all this does is speed up creation time and allows theme developers more time for those extras that everybody likes.

Jeff - Does your theme kit implement widgetized sidebars?
Cal - Yep, the themer kit makes themes for WordPress 2.2.x and 2.3.x and implements tags and widgetized sidebars.

Jeff - I noticed you wrote these primarily as templates in Dreamweaver. Can other editors be used to edit these files without breaking them?
Cal - All the kit requires is a CSS editor and a browser.

Jeff - Can you explain in a little more detail as to what you mean by Flavors? Also, can you elaborate on the various licensing structure for the various aspects of the themer kit.
Cal - Flavors are something we’re planning on creating and they’re basically just modified themer kits. So for example you could create a flavor that would utilize advertisements in different areas of the theme or a flavor that had a submenu for child pages in the header, the sky is the limit.

The licensing is meant to be as open as possible for theme creators. If you make a theme with the themer kit you can release it under any license you want, just like making a theme normally. We also have exceptions to our HTML blank licensing so you can release the HTML file with your theme and not worry about licensing issues. Releasing your HTML file with your theme will give theme users an easy way to modify the theme to suit their needs. If you want the specifics on licensing it’s best to visit the website and view the license page.

Jeff - What are your future plans with themer kit?
Cal - My plans are to make the theme creation process as easy as possible. Users should be able to have a blog and a forum that utilize the same basic theme and web designers should be able to create those themes as easily as a static page.

I want to extend a thank you to Cal for taking the time to answer my questions in regards to his project. Be sure to check out his website and give his theme kit a try. I’d especially be interested to see what you guys come up with in regards to using his kit as a framework for your themes.

2/23/2008 ↓

Printer Friendly Codex 12comments

Author: Jeff Chandler Category: WordPress

One of the most annoying issues I have with the Codex is the lack of a printer friendly link. There are plenty of times where I and many others would like to print out an article to keep handy for use later on, or to keep right in front of you as you are performing the steps to a particular set of directions. I was going to work on adding this printer friendly link to the Codex via CSS but thanks to Jeremy Clarke who appeared on episode 6 of the WordPress Weekly podcast, I now know of a way to enable this functionality.

As it turns out, you can register an account with the Codex website. For whatever reason, I’ve never noticed this until it was pointed out to me. Once I registered an account, I saw a wealth of options that I hadn’t seen before. After clicking on My Preferences to manage my account, I noticed I could change the skin that is displayed on the Codex. By default, the Codex (default) skin is chosen, but the one that closely resembles the look and feel of Wikipedia is called Monobook.

Monobook

After changing the skin, you’ll notice on the left hand part of the page that there is a section called a Toolbox. Within this tool box is the coveted Printer Version link which will change the article’s page layout so that it is printer friendly. I have gone back and changed my skin back to the default codex to see if registering an account produced this toolbox.However, there simply is no printer version link within the default skin.

Personally, I enjoy browsing the Codex through the Monobook skin. Thanks to Wikipedia, many people are already used to the layout, so it shouldn’t be that hard of a switch.

1/24/2007 ↓

30 WP Themes in 30 Days 2comments

30 WP Themes in 30 Days “Small potato” wants to develop 30 new Wordpress themes in 30 days and calls it the “Ridiculously Mind-Numbing WordPress Self-Challenge”. It probably would be, considering the rules that he has set for himself and his limitations that he admits to on the post. Something like this has been attempted before by Phu with a lot of success. However, in looking through the existing themes that he has developed and offered for free download to Wordpress users, I think he can do it with a little encouragement from all of us. Even if he is not completely successful, he will learn a lot and will provide a lot for the Wordpress community (and receive a lot of attention) Thanks to Lorelle for finding the post, who is also blogging for the Blog Herald.

4/11/2006 ↓

  • New Theme: Internet Market

    Professional 3 column Wordpress theme from KaushalSheth.com here (0)

2/21/2006 ↓

WP Theme: Simpla 1comment

WP Theme: Simpla Phu has embarked on “A Theme a Day” week where he designs and offers for download a Wordpress theme every single day of the week. His offering for today happens to be Simpla, which is one of those themes that you look at and go…”I can see my blog in that skin”. Very nicely done, simple, two column, colorful, iconful, detailed theme for Wordpress. Thanks Phu.

2/14/2006 ↓

  • miniBlog : a Theme for Wordpress

    miniBlog: tiny, light, soft grey, rather elegant and clean theme for Wordpress. Comes with admin features such as built-in Asides support. (0)

11/17/2005 ↓

Adsense featured Wordpress theme 10comments

Tim Yang and Ozh have released Problogger Clean, a clean 3 columns theme with original features mostly aimed towards Adsense.

Options are managed from an admin panel (using Wordpress Theme Toolkit) which gives the theme a lot of functionalities and customization possibilities.

The theme comes with built-in ads, so you won’t have a hard time trying to implement ads in a theme that was not designed for it. Its feature I like best : “Adsense Click Safety“, which prevents any click you could make on your own ads to be recorded, therefore to be counted as fraudulent.

Read more : Tim’s announcement, Ozh’s announcement.

11/12/2005 ↓

Connections Reloaded 1.2.1 released 1comment

v1.2.1 of Connections Reloaded has just been released.

Just a few minor changes

  • Added a button for Google Reader (thanks to Lorelle)
  • Fixed a validation problem. Theme is once again valid XHTML 1.0 Transitional
  • The zip file also includes screenshot.png. This is a screenshot of the theme and will be displayed in the Presentation section of WordPress v1.6
  • Minor CSS improvements

Read more and download Connections Reloaded.

11/10/2005 ↓

Integrating FAlbum with Connections Reloaded 1comment

If you are using Connections Reloaded on your blog and would like to integrate Falbum then please read HOWTO: Integrating FAlbum with Connections Reloaded. FAlbum is a Wordpress plugin that allows you to display your Flickr photos and photosets on your site. Connections Reloaded is my theme for WordPress 1.5.x

11/6/2005 ↓

Connections Reloaded 1.2 released 3comments

v1.2 of Connections Reloaded has just been released.

1.2 comes as a major update with a lot of additions as follows:

  • I have added Links and Pages to the sidebar. Links displays only on the homepage while Pages displays all throughout. Currently only top level pages are displayed. You will need to edit the sidebar.php to display daughter level.
  • Version info is not added to the footer. Easy for keeping track.
  • Display of nested categories in the sidebar has been fixed
  • Have added buttons under subscription for Feedster, Spurl, Furl, Newsburst, Rojo and Pluck. If anyone knows the button for adding to Google Reader, please let me know.
  • All images used by the theme are now included in it, especially those used in the sidebar.

Read more about Connections Reloaded.

10/31/2005 ↓

  • Another Wordpress Theme Browser

    Another Wordpress Theme Browser I had not seen this one yet, but it looks like this one is stocked with close to three hundred themes with nice thumnails for each and is paged. Thanks Blogging Pro (1)
Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

Latest Videos

Latest WordPress Jobs

S2