WordPress.com News: Posterous Importer

February 8th, 2010

Posterous is a blogging system that launched with an interesting twist — everything happens via email from signup to posting. Since the launch of our post by email features in addition to things like email comment replies and blog subscriptions we’ve been receiving more inquiries from people wanting to graduate from Posterous to a full blog with the features, flexibility, and reliability of WordPress.com.

It was actually easier than we thought: Posterous has a very nice API for reading from and writing to their service.

After logging into your WordPress.com Dashboard, click on Tools -> Import.

Click on the Posterous importer.

Type in your Posterous host name, user name, and password and click the Submit button.

The importer will validate your user name and password. After starting the importer, you can sit back and watch the status counters tick away.

You can also safely leave the importer page or close your browser. The importer will keep running.

Currently, the importer can import posts, tags, comments, and image attachments.

We will send you an email when the import finishes. Easy peasy!

There are a few things still on our roadmap, like more auto-post functionality, but don’t worry it’ll all be ready soon.


StylizedWeb.com: Wordpress CMS Plugins – Two New Ones to Add to Your Arsenel

February 8th, 2010

I have tried a lot of different content management systems. Everything from Drupal, to Joomla to Silverstripe and ModX. While I like a lot of them for different reasons I always find myself coming back to Wordpress for 80% of my design firms projects. It's simplicity, scalability and huge community base make it a great platform for so many different types of websites.

Having tried so many different content management systems (not to make it sound like I am a CMS whore, although I probably am) I have come across features and functionality that I feel would be extremely useful to integrate Wordpress. Silverstripe's simple page focused navigation lead me to develop the dashboard pages plugin, which makes it easy to sort and find the page you are looking to edit or manage off of the homepage rather than having to click to find it.

What I Look For in a CMS and How it Applies to Wordpress

There are really only a few primary criteria in what I look for in a CMS, so it is shocking that so many content management systems get it wrong. I always focus on:

  • User friendliness to a non tech savvy user
  • Capabilities with plug-ins
  • Ease to template and configure
  • Quality of XHTML code delivered

Out of all of those items I would say being user friendly is probably item number one. This is primarily because I really, really, really dislike having to do tech support phone calls on how to do X, Y or Z on a site. I also really, really dislike long CMS training sessions.

So maybe it is born out of selfishness, but a lot of the plugins that I develop are directly related to making Wordpress easier to use for the average website owner. Out of the box I feel Wordpress is simple and user friendly, however a bit too blog focused when it comes to using it as a primary CMS tool. This isn't really a criticism because Wordpress is a blogging platform first and CMS second — however that doesn't mean we shouldn't look to improve where we can.

CMS Dashboard

I have run into a handful of content management systems that make the most common actions so big and obvious no one could miss them. This is one major focus I feel the dashboard of Wordpress lacks. A majority of the Wordpress dashboard is on plug-ins, news, quick posts, comments, etc... all things that are not very important when it comes to managing an average website. Sure the menu on the left gives you access to all of the major items but there is no emphasis on common tasks and it is easy to skip over an important element because it is hidden amongst everything else.

CMS dashboard puts a widget on your Wordpress dashboard with large icons and links to the most common tasks your users will perform including:

  • Add / manage posts
  • Add / manage pages
  • Add / manage users
  • Add / manage widgets
  • Manage settings

This way you will never get a call asking how to add a user or change a widget. It also will speed up the time it takes to perform tasks and lead to a better CMS experience.

Download or Read More about CMS Dashboard

Editor Tabs

Another design element I loved with Silverstripe was the tabbed interface. Let's face it, there is a lot of controls you can add to any given page that is managed. Especially when you start working with page titles, meta tags, navigation text, custom fields, custom write panels, etc... If you use either the PODS or Flutter CMS plug-ins you are likely to end up with editing pages that have so many meta boxes you have lots of scrolling up and down to simply make an alteration and then publish the page.

This is because Wordpress chooses to have additional control over a page done in a very flat manor. This works when you are simply managing a blog and don't have too much information to control, but once you start using Wordpress as a CMS it can be cumbersome.

I have had plenty of calls where a client wasn't aware they had control over a part of the site simply because it was so far down on the editor page.

Editor Tabs fixes this by automatically generating a javascript based tabbed navigation menu below the main content editor comprised of all the meta boxes that are on the page. That way you can easily flip through the different options, make a change and hit publish with out having to scroll all the way up and down. Additionally you have a clear idea of what can be controlled and you don't have to hunt for it.

Download or Read More about Editor Tabs

Feedback or Suggestions

I would love to hear any feedback or suggestions. I created these plug-ins because I would find them personally useful, however I am sure there are other small tweaks or alterations that could improve upon them.


Ptah Dunbar: Round 2: Preset Widgets to Widget Areas

February 8th, 2010

A while ago, I wrote about how to preset widgets to widget areas (sidebars) in themes, but that method doesn’t work anymore with the new multi-widget implementation. Here’s the new way:

Step 1: Add a new instance of the widget to the options table

update_option( 'widget_search', array( 2 => array( 'title' => '' ), '_multiwidget' => 1 ) );

Parameters:

  • Prefix widget_ with the id base of the Widget’s class.
  • A two-dimensional array with:
    • the first array containing the widget’s settings
    • and the second containing the required: '_multiwidget' => 1

Note: In the second parameter of update_option, I gave the array a key value of 2. This number is intentionally there. More on that in step 2.

Do as many of those update_option calls for each widget instance you’d like to register. Then move along to step two:

Step 2: Update the sidebars options table

update_option( 'sidebars_widgets', array(
	'sidebar-1' => array(
		'search-2',
	),
	'wp_inactive_widgets' => array(),
	'array_version' => 3
));

The only thing you have to change here is the array in the second parameter:

  • The array keys should be the id of the widget area
    • And it’s values should be the id base of the widget’s class, a dash, and then the same number we used as a key for the widget (created in step 1). In this case, it’s 2.

You may optionally preset widgets as inactive by throwing them in the wp_inactive_widgets array. And I wouldn’t mess with the array_version array. This is a hack since we’re not using any proper APIs to preset widgets so don’t go messing around with too much.

Et volia! You just perform the equivalent of selecting a widget from the available widgets section, dragging that instance over to a widget area, configured it, and saved the changes.. all through code!

Here’s the complete code along with additional sidebars and widgets so you see how that looks.


WordPress.com News: New Theme: Steira

February 8th, 2010

Full of character yet minimal, we bring you the wonderful “Steira,” bursting at the seams with detail and functionality.

Steira in all its glory!

Recent Comments Widget for Steira

The sidebar is large in this theme giving you a lot of room to play.

Any widget will do, but the custom widgets are quite convenient and stylish. The “Recent Comments” widget is especially nice. It shows a dedication to your content while at the same time keeping the visual intensity that the rest of the theme boasts.

The "New" post.

There are a lot of subtle details in this theme. Most notably, your newest post shows up with a nice “New” label, giving your users a heads up.

If you’re wondering why you haven’t seen Steira before, it’s because you haven’t. It was designed by Made by Elephant for WordPress users.

The theme will soon be available in the Theme Repository over at WordPress.org and we’re extremely happy to be sharing it with you today.


Digging into WordPress: Custom CSS Per Post

February 8th, 2010

I’ve long been a fan of “art directing” posts. That is, to apply unique CSS styling to an individual page of content when the situation calls for it. In the past, I’ve used the Art Direction plugin and I even created a screencast on using it.

As it turns out, there is a major problem with the art direction plugin. Using it with any caching plugin will result in a crazy epic meltdown of your site. Without too much gory detail, in trying to cache my blog CSS-Tricks, I tried all the major caching plugins (DB Cache, WP Super Cache, W3 Total Cache) and ultimately it would trash my WordPress database and serve up white pages. Very not good. The happy ending is that Frederick Townes from W3 Edge and creator of the W3 Total Cache plugin helped me out by patching the art direction plugin and getting CSS-Tricks cached with W3 Total Cache. I would love to release the updated code, but it’s not my code to release. We managed to get in touch with the original author, who said he planed to eventually update it but didn’t sound too particularly interested in the patch.

SO, with that extensive backstory, what is a poor fellow to do if they want to apply custom CSS to pages TODAY? Couple ideas, read on.

style-XXXX.css

One of my “WordPress Wishes” was that you could drop an appropriately named CSS file into a theme and it would recognize it and apply itself to the proper post. For example, /art-direction/style-XXXX.css, where XXXX is the ID of the post.

Reader Hassan commented with a cool idea for the functions.php file:

function artStyle() {
    global $post;
    if (is_single()) {
        $currentID = $post->ID;
        $serverfilepath = TEMPLATEPATH.'/art-direction/style-'.$currentID.'.css';
        $publicfilepath = get_bloginfo('template_url');
        $publicfilepath .= '/art-direction/style-'.$currentID.'.css';
        if (file_exists($serverfilepath)) {
            echo "<link rel='stylesheet' type=text/css' href='$publicfilepath' media='screen' />"."\n";
        }
    }
}
add_action('wp_head', 'artStyle');

I tested it out and it works great. To use it, simply create a new folder called “art-direction” in your theme. Then to style any particular Post or Page, just drop a file in that folder named style-XXXX.css where XXXX is the ID of the Post or Page. When that Post or Page loads, WordPress will look for a file of that name. If it exists, it will load in in the head section.

Custom Panel

Reader Kerrick Long commented another cool solution. Similar to the Art Direction plugin, this adds an input area below the main content writing area. For the functions.php file:

//Custom CSS Widget
add_action('admin_menu', 'custom_css_hooks');
add_action('save_post', 'save_custom_css');
add_action('wp_head','insert_custom_css');
function custom_css_hooks() {
	add_meta_box('custom_css', 'Custom CSS', 'custom_css_input', 'post', 'normal', 'high');
	add_meta_box('custom_css', 'Custom CSS', 'custom_css_input', 'page', 'normal', 'high');
}
function custom_css_input() {
	global $post;
	echo '<input type="hidden" name="custom_css_noncename" id="custom_css_noncename" value="'.wp_create_nonce('custom-css').'" />';
	echo '<textarea name="custom_css" id="custom_css" rows="5" cols="30" style="width:100%;">'.get_post_meta($post->ID,'_custom_css',true).'</textarea>';
}
function save_custom_css($post_id) {
	if (!wp_verify_nonce($_POST['custom_css_noncename'], 'custom-css')) return $post_id;
	if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;
	$custom_css = $_POST['custom_css'];
	update_post_meta($post_id, '_custom_css', $custom_css);
}
function insert_custom_css() {
	if (is_page() || is_single()) {
		if (have_posts()) : while (have_posts()) : the_post();
			echo '<style type="text/css">'.get_post_meta(get_the_ID(), '_custom_css', true).'</style>';
		endwhile; endif;
		rewind_posts();
	}
}

Custom CSS Write Panel

As written, it’s more limiting than the Art Direction plugin as it is for CSS only rather than “anything” (e.g. JavaScript), although that would be a fairly trivial adjustment to what gets echoed out. The Art Direction plugin also allowed the CSS to be applied in other places the post might be output, for example, archives pages, whereas this does not. But to be honest, I never used that anyway.

And so…

Two pretty sweet and totally function solutions by Digging Into WordPress readers. Awesome. Huge thanks to Hassan and Kerrick! I would also love to see the Art Direction plugin updated as well, if nothing else, because I’m sure people download that plugin every single day from the plugin repository and have caching going on their blogs and end up in the same sore spot I was.


Holy Shmoly!: WP Super Cache 0.9.9

February 8th, 2010

Well, the new WP Super Cache is available now.

This release adds experimental object cache support. Don’t go looking for it unless you have an external object cache already. It won’t show up. I recommend using the Memcached object cache.

Some of the other major changes include more translations: Chinese (Pseric), Ukranian (Vitaly) and Japanese (Tai). The Italian and Japanese translations have since been updated but not included in 0.9.9. You can grab them from the languages directory if you don’t want to wait until the next release.

If you have WordPress Mobile Edition installed the plugin will grab the list of mobile user agents from that and warn if your .htaccess is outdated.

And, a small but significant change is that the PHP cache loader will use the static “super” cache if necessary. This might happen if your rewrite rules aren’t working properly and not serving cache files. At least your anonymous visitors will see some sort of cached file. Use the debugging system built into the plugin to determine where the cache comes from.

See the changelog for the complete list of changes.

Related Posts


Justin Tadlock: It’s the little things that matter

February 7th, 2010

I consider myself a decent PHP developer, and I know enough about design to ruin a beautiful image in Photoshop. I’ve made quite a few plugins and themes over the past few years for WordPress as well.

When I’m asked how I got to the point I’m at in the WordPress community by upcoming developers, the best response I can give them is: It’s the little things that matter. If you’re not taking care of them, then the big, grand things you’re doing will only get you so far.

What are the little things?

The little things are usually things that WordPress does that slightly irritate me. They don’t irritate me enough to switch platforms, but they are things that I wish were different.

I’ll show you an example of just what I mean with two pictures of the same comment using different themes. See if you can find the major difference (i.e., the little thing) between the two.

The first is from the default WordPress theme:

Default theme pingback

The second is from the development version of my Hybrid theme:

Hybrid theme pingback

Notice the difference?

The default theme displays the title text of the edit link for a pingback as “Edit comment,” which is standard for WordPress. The Hybrid theme displays “Edit pingback” instead.

Why make these little changes?

At this point, you may simply think I’m crazy for changing “comment” to “pingback,” but the example is hardly the point.

What’s more important is that I would’ve likely had a user come along one day and ask, “How can I change ‘Edit comment’ to ‘Edit pingback’ for the pingback comment type?” Rather than having to explain how to do this or even coming across the question at all, it’s already done.

An equally valid reason for doing so is that this is simply how I want things done on my personal blog. And, when I code something that benefits me, it’s easy to give that back to the community.

Those little things do matter

While you may not take things as insanely far as I have in my example, it’s important to recognize how these seemingly insignificant things can help you and your users. For example, this can translate into fewer support questions or become marketing points for your plugins/themes.

Attention to detail is the extra thing you should bring to the table, and end users always appreciate it when the details are covered.


Ajay on WordPress: Bug fix releases for Contextual Related Posts and Top 10

February 6th, 2010

Just released two bug fix updates for two of my plugins:

Top 10

Track daily and total visits on your blog posts and display the count as well as popular posts.

Contextual Related Posts

Display a list of contextually related posts for the current post.

Changes to Contextual Related Posts:

  • Fixed: Custom output was not detecting styles properly
  • Fixed: Incorrect XHTML code was being generated when using special characters in the post title
  • Added German translation

Changes to Top 10:

  • Added: You can now use HTML in the counter display

Visit: WebberZone Domains - .com, .net, .org, .biz domains at $8.95/yr only! Private Registration FREE!

Tags: , , , , ,

Bug fix releases for Contextual Related Posts and Top 10 was first posted on February 6, 2010 at 10:41 pm.
© 2003-2009 "Ajay - On the Road called Life". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me.

Feed enhanced by the Add To Feed Plugin by Ajay D'Souza

Viper007Bond.com: Ugly Betty Uses WordPress

February 6th, 2010

Jane noticed that Ugly Betty uses WordPress, so I thought I’d post some screen caps. It’s been heavily reworked, but you can still tell the production staff used WordPress as a base.

Pretty funny.

Related posts:

  1. My WordPress 2.7 “Add New Post” Screen
  2. Broke My Blog
  3. Dashboard Widget Manager’s Dash Editor Broken


WordPress TavernWordPress-org: WordPress Dev Chat For 2-04-10

February 4th, 2010

wordpresslogoRead the entire meeting in detail here.

Update on progress of the 2010 theme
Matt Thomas let everyone know that the 2010 theme was just about done. Thanks to Ian, post thumbnails now work as custom headers in the default theme. The only things left to do are custom background color/image picker and cross-browser testing. Custom styles for category-asides and category-gallery as well as dropdowns are done.

Update on merge testing – wpmuguru / testers
So far, there is good feedback coming in giving the impression that the MU side of things are stable. So far, it looks like they are fairly on schedule for February 15th to have the multi-site stuff complete. The UI for multi-site is currently being worked on by Jane Wells as well as a few other people in case wireframes are needed. DD32 and Nacin are going to work on ticket 11816 that focuses on users being able to switch from a standard single install to a multi-site install.

Update on menu management progress
Progress has stalled since the talk last Thursday regarding menu management. Ticket 11817. The biggest concern with the widget menu system is how well it would deal with submenus. The current thinking is that it probably wouldn’t work too well. Based on the conversation I read, menu management still does not have a concrete direction. There will be wireframes for menu management that should be published to the WPUI blog first to get community feedback and then next week, there will be a discussion on whether to punt, delay, etc.

Update on progress of core plugins
Things haven been progression but slowly due to volunteers being busy themselves. Some of the volunteers for the Post By Email plugin seem to have disappeared so if you’re interested in working on that plugin, sign up to the mailing list and introduce yourself. Post by email has most of the features that WordPress.com has now. The direction of the plugin including a roadmap needs to be establishes as a team. Westi has not had a chance to think about the UI implication for core plugins and how they may be promoted or made available as a bundle. Jane Wells has opted to put it on the list for the UI group to work on to see what they come up with. There also needs to be some sort of information screen where the Post By Email feature currently resides in WordPress to let people know where to find it.

like_escape discussion
For this part of the meeting, I encourage you to start here and make your way up as I have no idea what they are talking about.

How To Participate:

If you want to suggest a topic to be discussed at the next meeting, you can by visiting the WordPress development updates blog. If you would like to participate in the chat next week, install IRC or an IRC compatible client and connect to the following IRC server.

chat.freenode.net or any random server on the Freenode network and then join this channel at 3:30PM Eastern time or 20:30 UTC Thursdays. #wordpress-dev.

Related posts:

  1. WordPress Dev Chat For 1-07-10
  2. WordPress Dev Chat For 1-14-10
  3. WordPress Dev Chat For 10-22-09


Raanan Bar-Cohen: WordPress for BlackBerry

February 4th, 2010

Back-to-back mobile news posts !

This time, our Open Source WordPress for BlackBerry app has hit 1.0, and is now in RIM’s App World.

I’m really excited that this release also includes support for video, including support for those who use VideoPress:

More info on blackberry.wordpress.org .

Tagged: blackberry, release, videopress
Introducing WordPress for BlackBerry 1.0

WordPress.com News: Improved Polls and Ratings

February 4th, 2010

We have made a couple of updates to the polls and ratings feature on WordPress.com that you may have already noticed.

Ratings on front page

There is now an option in the ratings settings to allow you to display your posts ratings on the front page.

Usage is very simple – pick whether you want the rating above or below the post, and save.

Your ratings will now appear on your blogs front page… nice!

Poll Options Menu

You may have noticed a new menu option under the polls menu – Options.

Here you can import another PollDaddy account if you wish to access another account from your WordPress dashboard.

Using the default poll settings, you can set your typical poll settings, like a custom style. Then with each new poll created, these default settings are loaded automatically, saving you time and hassle.

Expiration limit on block repeat voting

There is an additional setting in the poll editor that allows you to set a limit on how long to block repeat voters.

Just choose one of the block options, select how long you wish to block repeat voting and save your poll.

We have also made a few minor updates like adding support for right-to-left (RTL) languages, and tightening permissions. The WordPress.org plugin has also been updated with these changes and with a few additional ones detailed on the PollDaddy blog.

You can find out more details on the support page.


W-Shadow.com: The Viralogy Offer

February 4th, 2010

Viralogy logoIn this post I will explain what the “Viralogy.com script” thing mentioned in the Broken Link Checker survey was all about, discuss the user response and attempt to verbalize my rather unclear thoughts on the issue.

Viralogy Script

About two weeks ago, I received an offer to bundle a social media tracking script from Viralogy with my Broken Link Checker plugin. This script, which is properly called the “Dynamic Insights Tracker”, tracks the flow of visitors and analyses their preferences and social media activity. If installed on your blog, it would record various data about your visitors and report it back to Viralogy. In turn, this information could then be used to present the tracked visitors with a personalized experience on other sites.

Here’s a simplified example :  say you have a  blog about the Kindle and other e-ink devices, and you’ve got the tracker script installed. When someone reads an e-book reader review on your blog, the tracker script will take note of that. If the same person later goes on to visit an e-commerce site that deals in a variety of gadgets, the Viralogy API will enable that site to find out that the visitor might be interested in e-book readers, and present them with a dynamically optimized store page that puts the Kindle front and centre.

Naturally, I have been assured that privacy matters a lot to the people at Viralogy Inc, and that nothing untoward would happen to anyone’s personal information. This seems about as believable as the Google Analytics privacy policy.

What’s In It For Me?

Money. Well, duh.

According to Viralogy, I would receive a small bi-annual payment per each blogger who installs my plugin(s) and enables the script. Given that I still don’t have any reliable statistics on how many people actually use my plugins, it’s not really possible to tell how much cash that would amount to. By a very rough estimate, it could be anywhere from $50 to $5000. This uncertainty vexed me.

What’s In It For You?

Not much.

I’m sure I could make up some plausible-sounding bulshytt about how installing the script demonstrates your gratitude towards the plugin developer, and how having the script installed allows you to express that gratitude without actually giving the dev. any money yourself. And it does sound plausible, now that I think of it. But in the end, the tracker script wouldn’t give you any direct benefits.

The survey results also show a general lack of enthusiasm for third-party scripts :

Q : I have received an offer to bundle a social media analysis script from Viralogy.com with Broken Link Checker. Your thoughts?

Pie chart : Should I include the script?

Include the script - 16%, Don't include the script - 39%

People who chose “Other” mostly asked for more information about the script, or said they would be okay with the script being included if actually enabling it was optional. Of course, it would definitely be optional – that’s the only non-evil way to include the script.

Q : If the aforementioned script *was* included, would allow the plugin to install/enable it?

Pie chart : Would you enable the Viralogy script?

Yes - 39%, No - 61%

Conclusions

Tricky tricky. My gut says “maybe”, so let’s do it the hard way and evaluate the pros & cons of this offer.

Pros :

  • Me : A vaguely defined amount of cash.
  • Users : None.
  • Everyone else : The beginnings of personalized web-browsing. Yes, this is a good thing. It’s also pretty much inevitable in the long-term – if not by Viralogy, then certainly by the future efforts of Google/Amazon/Microsoft.

Cons :

  • Me : Potential for negative publicity. That could even be useful, but meh.
  • Users : None that I can see. The script would be optional anyway, so those who don’ t like it could simply not enable it. Perhaps a minority would have some ideological objections? Either way, the user response was generally unenthusiastic.
  • Everyone else : Another tracking script for paranoid Internet users to worry about. Compare with Google Analytics & co.

The costs are relatively small, and the benefits are likewise not very impressive. Conclusion : Not worth it.

Perhaps some other time.


Copyright © 2010 W-Shadow.com. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@w-shadow.com so we can take legal action immediately.

WP Engineer: WordPress: Useful Default Configuration Settings Via Plugin

February 4th, 2010

Everybody who installs WordPress quite often knows the problem: You always have to do the same adjustments, for example deleting the Hello World post. That cost time and money. Our friend Thomas Scholz alias toscho had a simple but genius idea, he puts all needed option settings in a Plugin. Just activate the Plugin, deactivate it and delete it. Done!

You can adjust and expand the options as you like. A good overview is the wp-admin/options.php.

<?php
/*
Plugin Name: Toscho's basic settings
Plugin URI: http://toscho.de/2010/wordpress-grundeinstellungen-per-plugin-setzen/
Description: Some useful default configuration settings. See 'wp-admin/options.php' for more options.
Version: 0.2
Author: Thomas Scholz
Author URI: http://toscho.de
*/
 
function set_toscho_defaults()
{
    $o = array(
        'avatar_default'            => 'blank',
        'avatar_rating'             => 'G',
        'category_base'             => '/thema',
        'comment_max_links'         => 0,
        'comments_per_page'         => 0,
        'date_format'               => 'd.m.Y',
        'default_ping_status'       => 'closed',
        'default_post_edit_rows'    => 30,
        'links_updated_date_format' => 'j. F Y, H:i',
        'permalink_structure'       => '/%year%/%postname%/',
        'rss_language'              => 'de',
        'timezone_string'           => 'Etc/GMT-1',
        'use_smilies'               => 0,
    );
 
    foreach ( $o as $k => $v )
    {
        update_option($k, $v);
    }
 
    // Delete dummy post and comment.
    wp_delete_post(1, TRUE);
    wp_delete_comment(1);
 
    return;
}
register_activation_hook(__FILE__, 'set_toscho_defaults');
?>

Here you can download the Plugin by toscho.


Related posts:


WP Engineer Favicon Thanks for subscribing our feed! Sponsor the WP Engineer Blog and get your brand in front of several hundred users per day!
© WP Engineer Team, All rights reserved (Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)


Digging into WordPress: Remove Private/Protected from Post Titles

February 3rd, 2010

I had the situation come up where I need a password-protected post in WordPress. Of course that is super easy in WordPress, you can set up a password for it right in the “Publish” box before publishing. But by default, WordPress appends “Protected: ” to the front of the post title, before and after the password has been entered. I didn’t like that, and thought that the password box was clue enough that the material was password protected.

I ran across some simple code in the official WordPress forums with a solution (thanks, t31os_!).

function the_title_trim($title) {

	$title = attribute_escape($title);

	$findthese = array(
		'#Protected:#',
		'#Private:#'
	);

	$replacewith = array(
		'', // What to replace "Protected:" with
		'' // What to replace "Private:" with
	);

	$title = preg_replace($findthese, $replacewith, $title);
	return $title;
}
add_filter('the_title', 'the_title_trim');

I saw a plugin to do this too, but I think since this is rather theme-specific, functions.php code makes the most sense.


Ajay on WordPress: WordPress Picks for the Week [02/03]

February 2nd, 2010

WordPress Picks for the Week

Following this week, I will be publishing the WordPress Picks series every Wednesday, instead of Sunday.

55+ Most Wanted WordPress Tips, Tricks, and Hacks

I'm not a big fan of super long posts, but this is a comprehensive list of articles and tutorials regarding WordPress

Load A Stylesheet Only If Use Gallery

If you are using the WordPress Gallery, you should load the the stylesheet only the pages on which the gallery is displayed

How to Add Content and Completely Manipulate Your WordPress RSS Feeds

Some tricks on adding to customizable text to your RSS feeds. You can also do some of this with my plugin Add to Feed.

Rounded Font-Sizes (with Colors!) for Tag Clouds

By default, WordPress uses non-rounded font sizes when creating a tag cloud. By converting this to a rounded font size like 22, 24 etc, you can even using CSS classes to style special font-sized tags.

Add a favicon to your WordPress blog using a hook

If you don't have a favicon, then it means that your blog has something majorly lacking. Besides, you're error_log will go crazy with 404 requests. This is definitely not my preferred solution, because you should not be adding unnecessary functions to your theme to reduce loading.

Using Filters With get_posts()

A small tutorial that will teach you how to fetch custom posts using get_posts()

Remove Private/Protected from Post Titles

WordPress allows you to create private and protected posts (though I have never used this ever). All such posts are "labelled" accordingly. Here's how you remove it.

How to Limit Content in WordPress

By default, WordPress includes 55 words in the excerpt. You can easily change this with a bit of code.

Our Friend: WebberZone Domains - .com, .net, .org, .biz domains at $8.95/yr only! Private Registration FREE!

Tags: ,

WordPress Picks for the Week [02/03] was first posted on February 3, 2010 at 2:45 pm.
© 2006-2009 "Techtites". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact us with the details.

Feed enhanced by the Add To Feed Plugin by Ajay D'Souza

Viper007Bond.com: I’ll Be Attending WordCamp San Francisco

February 2nd, 2010

I’ll be attending WordCamp San Francisco on May 1st. If you’re planning on being there, make sure you say hi. I like putting a face to all those online / IRC nicknames. :)

EDIT: Just to be clear, registration isn’t actually open (yet), I’m merely stating my intent to go and was curious who else was planning on attending. ;)

Related posts:

  1. WordCamp Portland 2009
  2. WordCamp Portland


Raanan Bar-Cohen: WordPress for Android

February 2nd, 2010

Hot of the presses, joining the iPhone and BlackBerry app, we now have a native WordPress for Android mobile app.

Check out the video below for an overview:

Tagged: Android, mobile
Introducing WordPress for Android

Konstruktors Notes: Egīls Pārups (parups.com) running a child theme of Portfolio Racer

February 2nd, 2010

Parups.com is the very first website running a child theme of Portfolio Racer. The following plugins are helping out behind the scenes — Google XML Sitemaps, Infinite Scroll, Page Menu Editor, postMash (Filter), Top Level Categories, Widget Context and WP Super Cache.

Open source rocks!


WordPress for Beginners » Tutorials: How to Change the Category Base Prefix in WordPress

February 2nd, 2010

We got several requests asking the same question: How to modify the category base prefix in WordPress? Well there is a very easy way to change the category base prefix, but there is no real solution to completely remove this prefix. In this article we will show you how to change the category base prefix in WordPress, and we will also touch base on a possible way that will allow you to remove the category prefix entirely.

What is a Category Base Prefix?

In your URL structure, you will see something like this http://yoursite.com/category/wordpress

That word category is the base prefix that all WordPress blogs will have as long as they are not using the default permalink structure.

How to Change / Modify the Category Base Prefix?

It is really easy to change that prefix to anything you like. For examples then your URL would look like yourdomain.com/articles/wordpress

First you would need to go in your WP-Admin Panel and go to Settings » Permalinks

There you would see an Optional box which allows you to change the category base prefix and the tag base prefix. (Example Below)

How to Change Category Base Prefix in WordPress

Simply add the text that you like, and you are done. This way is guaranteed to work because it is a hard-coded option within WordPress.

How to Remove Category Base Prefix in WordPress

There is no bug free way to get this done. For those who want no problems with their site, we recommend that you do not even try this because it can lead to problems. There is a plugin that allows you to completely get rid of the prefix, so it would be yourdomain.com/wordpress rather than yourdomain.com/category/wordpress. This plugin is called Top Level Directories.

Known Issues:

This plugin will not work if you have a permalink structure like %postname or %category%/%postname% and there is currently no workaround.

If you add a suffix to your permalink structure (such as .html) you can fix this issue. For example, try %category%/%postname%.html – This is not ideal, but there is no good solution for this issue.

For now we suggest that you stick with a modified base prefix if necessary. All we can do is hope that WordPress adds this feature in the future versions.

How to Change the Category Base Prefix in WordPress is a post from: WPBeginner which is not allowed to be copied on other sites.

Related posts:

  1. SEO Friendly URL Structure for WordPress
  2. Rename the Uncategorized Category
  3. Multiple WordPress Installation Using a Single Database


Viper007Bond.com: WordPress: Using Filters With get_posts()

February 2nd, 2010

Something I just learned and thought I’d share to save others the trouble: if you’re attempting to filter the results of get_posts(), for example with the posts_where filter, you need to disable suppress_filters.

For example, here’s how to fetch some posts from within the past 30 days (based on an example from the Codex):

<?php

function last_thirty_days( $where = '' ) {
	$where .= " AND post_date > '" . date( 'Y-m-d', strtotime('-30 days') ) . "'";
	return $where;
}
add_filter( 'posts_where', 'last_thirty_days' );

$some_posts = get_posts( array( 'suppress_filters' => false ) );

?>

Related posts:

  1. WordPress Code: Earlier Shortcodes
  2. WordPress How-To: Force Direct Filewrites For Upgrades
  3. Easy Embeds For WordPress 2.9


Justin Tadlock: Showing custom post types on your home/blog page

February 2nd, 2010

In the last few days, I’ve shown a few people a screenshot of something I’ve been working on for this site. The screenshot is of a home page displaying custom post types and not just the post post type. After numerous requests for the code to do this, I figured it’d be much easier to share it here.

WordPress version 3.0 will make creating custom post types extremely simple. But, the techniques I’ll point out in this tutorial can be used with previous versions of WordPress.

Changing the post type on the home page

By default, WordPress shows the post post type on your home page. Let’s suppose we want to show several post types in addition to posts:

  • page (yes, regular pages)
  • album
  • movie
  • quote

To add these, open your theme’s functions.php file and paste this PHP code into it:

add_filter( 'pre_get_posts', 'my_get_posts' );

function my_get_posts( $query ) {

	if ( is_home() )
		$query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote', 'attachment' ) );

	return $query;
}

That’s all there is to it.

You may have noticed the addition of the attachment post type even though I didn’t mention adding it. This is something I highly recommend adding if you’ll be showing any attachment images on your home page For example, if you have a gallery on your home page, the images won’t appear without adding the attachment post type.

Showing the post types in your feed

Realizing that many of you might want to also add these post types to your feed to match your blog, a small change in the code is required. All you need to do is change this line:

if ( is_home() )

We’ll use the is_feed() conditional tag:

if ( is_home() || is_feed() )

Now, you can have custom post types in your regular blog post rotation and your feed. Enjoy and look for more custom post type tutorials soon.


StylizedWeb.com: 5 Steps to Make Wordpress an SEO Beast

February 1st, 2010

Now days high quality content and SEO go hand in hand, so it should be no surprise that a tool that makes it easy to publish content can be an SEO monster. You may be asking yourself, "Why would I want that?" If you are asking yourself that you probably also wonder why you would want to live long and prosper (2 points for a Star Trek reference). The advantages of SEO should be fairly obvious, more targeted traffic with out the high cost of traditional and online advertising.

Wordpress makes it very easy to publish content. In fact once you have it installed the hardest part is to actually make yourself write, find or commission the content. The actual publishing of the content is a second thought. How could this get any better do you ask? How about if we can make our posts super optimized with just a few tweaks and plug-ins?

1. Search Optimized Title

The title of your posts and pages is a large factor in how well your content ranks. All of the search engines such as Google, Yahoo and Bing all heavily weigh the title of your page and the keywords in it when deciding how relevant it is to search terms. This means that if you include keywords and phases in your page title you will get significantly more search traffic. Now by default Wordpress does a great job of including the title of your page in the document title, however we can improve upon it a little bit.

The closer the keywords and phrases are towards the start of the title the better you will rank. Wordpress put's it at the end of the title tag after the name of the blog, what we want to do instead is put it at the front. Luckily this is easy with the All In One SEO Plugin. Simply download and install and you can configure how the title is automatically generated.

2. Search Optimized Internal Linking

Links are critically important to SEO, in fact they can have one of the highest influences on how your sites rank. The search engines both take a look at how many links are pointing to your sites and pages as well as the words that used as the text for the links (ie: the anchor text). While links from other sites are the most effective types of links you can also improve your sites ranking by optimizing how you treat your internal links.

An easy way to do this is to ensure that each post has the title linking to the permalink for the page, this reinforces the keywords that are in your title with the post. This is an easy item to control through your theme template or simply by selecting a theme that uses the title as a link. If you can have the title also be a heading this will be even better.

Here is an example of the mark up / templating you can use to optimize your page titles:

 <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> 

3. Care with Duplicate Content

Many of the search engines are extremely sensitive when it comes to having several pages that have the same content. This is because at one point people wrote scripts that would scour the internet and steal your content, posting it on their own sites as a way to try and gain search traffic for advertising or affiliate links.

Wordpress out of the box is not great when it comes to duplicate content. Many of the tag and archive pages can end up duplicating your articles under several different URLs. To combat this we recommend two options:

Display article excerpts on archive, category and tag pages rather than entire articles

On the pages where you are displaying archives or tagged pages, instead of showing the entire article use the wp_excerpt(); tag to display a teaser of the article with a link to learn more. This will prevent search engines from picking up the same post or article on several different URLs.

Exclude archive pages with your robots.txt

If you would prefer to have your archive, category and tag pages display full articles you can always exclude all of them except one by using your robots.txt file. The robots.txt file can tell web crawlers like the ones that are powered by search engines not to index parts of a given site. This is simply done by putting a text file named robots.txt in your root directory and including code similar the following:

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
Disallow: /tag
Disallow: /author
Disallow: /2010
Disallow: /2009
Disallow: /2008

4. Search Optimized Sitemaps

As you publish more and more content search engines can start to have difficulty finding all of your content and ensuring that it is all indexed. There are two ways we can ensure that search engines have as much information as possible as to what content is published on our wordpress sites and where they are published.

Keep an up to date XML sitemap

Search engines now look for a sitemap.xml file that contains the structure of your website with in the root directory. Additionally many search engines will also let you register and specify where you sitemap.xml sits on your server (Google Webmaster Tools for example gives you this capability). The XML sitemap plugin will automatically generate and update your sitemap.xml every time you create a new post so you can be sure that the search engines know about every post that you have.

Keep an up to date HTML sitemap

The other way that search engines find new pages and articles on your site is simply by navigating the links on your pages. By having one page that lists all of the posts on your site, the search engine can easily access every post from one central easy to find place.

Rather than update a page every time you create a new post or page, we suggest using the sitemap generator plug-in for Wordpress. Much like the XML sitemap generator, this plug-in will generate and update your HTML sitemap automatically every time you add a page or post.

5. Search Optimized Promotion

Once your have created a blog and some posts you need to actually promote them to get users and the search engines to take notice. Simply posting content and hoping that people will stumble upon them might be a little optimistic. Instead we want to be proactive about getting our content noticed and there are some great ways to do this.

Improving your Ping Pang

When you create a new post wordpress sends a notification to different services to look up and acknowledge the new content. We can improve this however by expanding the list of services that Wordpress pings. Simply go to settings > Writing and paste the following list into your "Update Services" box

http://api.moreover.com/RPC2

http://bblog.com/ping.php

http://blogsearch.google.com/ping/RPC2

http://ping.weblogalot.com/rpc.php

http://ping.feedburner.com

http://ping.syndic8.com/xmlrpc.php

http://ping.bloggers.jp/rpc/

http://rpc.pingomatic.com/

http://rpc.weblogs.com/RPC2

http://rpc.technorati.com/rpc/ping

http://topicexchange.com/RPC2

http://www.blogpeople.net/servlet/weblogUpdates

http://xping.pubsub.com/pin

Promote Socially

Almost every search engine looks at links as a vote that your site and content is worth reading (and thus should appear higher in search engines). Promoting your content to social media is an excellent way to get high quality links and traffic to your posts. Additionally many search engines are now monitoring and tracking real time discussions and linking such as Twitter updates. It is likely that if they are not using this in their algorithm now they will in the future.

To promote users sharing your content make it easy. The ShareThis plugin makes it easy for users to add your content to any number of their social networks or simply e-mail it to a friend. The added links using the plugin will give you will make your entire blog an SEO beast.


W-Shadow.com: Broken Link Checker Survey Results

February 1st, 2010

Last week I invited everyone who uses my Broken Link Checker plugin to answer a user feedback survey. The survey consisted of 11 questions covering a number of topics from overall user satisfaction to feature suggestions, monetization options and questions about the user’s server configuration. In this post I will summarize the results and maybe add some comments of my own.

In total, there were 761 responses to this survey. I don’t know what response rate that amounts to (WordPress.org doesn’t disclose the number of active plugin users even to the author of  the plugin), but the sheer number of responses was very impressive and much more than what I expected :)

Okay, lets move on to the actual results.

Q1 : How long have you been using Broken Link Checker?

Pie chart

According to the survey, 66% of people who have BLC installed have used it for 6 months or less. Taken alone, this is a rather ambiguous result. When you consider that the first version of Broken Link Checker was released more than two years ago, the large number of recent users can have two wildly different interpretations – either the plugin has a nasty attrition rate, or it has really gone up in popularity during the last 6 months.

Q2 : How satisfied are you with the plugin?

Bar chart

So it seems I needn’t have worried about the attrition rate – 74% of users said they were either “satisfied” or “very satisfied” with the plugin. I’m going to assume this means “good, but needs a bit of work”.

Then there’s the puzzling fact that 12% picked the “Very dissatisfied” response to this question. For one, this result is an obvious outlier. But what really puzzles me is this : the majority of users who answered this question with “Very dissatisfied” gave the plugin rather good ratings in other parts of the survey (like Q3 below). Some of them even said that “it’s already perfect” when asked what they’d like to change about the plugin. There were only 5 or 6 users who picked the “Very dissatisfied” answer here and gave similarly negative feedback to other questions.

I’m inclined to think some users just mixed up the “Very satisfied” and “Very dissatisfied” options. Something more distinct like “It sucks”/”It’s great” would probably work better and be less prone to confusion.

Q3 : How would you rate the plugin in each of these categories?

The user was also asked to rate Broken Link Checker on a 1-5 scale in five different categories. Here are the results for each category (average vote & answer distribution) :

  • Ease of use (4.35)
    Bar chart : Ease of use
  • Performance (4.13)
    Bar chart - Performance
  • Configurability (3.85)
    Bar chart : Configurability
  • Features set (3.89) 
    Bar chart : Feature set
  • Documentation (3.70)
    Bar chart : Documentation

Hmm, apparently I’ll have to buckle down and produce some actual documentation for the plugin. [Insert the standard joke about how programmers hate writing documentation.]

Q4 & Q5 :  What new features would you like to see added? / What other changes and improvements would you make to the plugin?

In total, I received more than 70 distinct feature suggestions/change requests/bug reports. That’s too many to list here, so I’ll only discuss the Top 15 of those that were suggested by more than one person.

1. Keep it simple (26 users)

A lot of users think the plugin is actually plenty good already and shouldn’t be bloated with more features. But they’re still a minority compared to the number of people who do want something changed/improved, so new features (and bug fixes!) there shall be.

2. Fix false positives & false negatives (22 users)

Okay, I get it – false positives are bad and annoying. I’ll do my best to fix them.

However, there is something that needs to be said here : for a plugin like this, it’s almost impossible to eliminate false positives. Many sites intentionally block any automated scripts (which includes the link checker) from accessing them. As a result, all links to those sites work normally when you click them in your browser but appear broken to the plugin.

Sure, I could probably fool some script-detectors by modifying the plugin to emulate a normal web browser. However, down that path lie nasty programming tricks, reduced performance and an increased potential for bugs. There’s an ongoing arms race between people writing site-scraping bots  and people trying to stop them, and sometimes it seems the only winning move is not to play.

But I might give it a shot anyway.

3. Email notifications about broken links (14 users)

It shall be done. Probably in the next major release.

4. Limit how much CPU/memory the plugin can use; fix freezing (9 users)

This is a rare bug, but it’s also a highly annoying one. To mitigate it, I’ll add an option to suspend link checking when the server is overloaded. Maybe some finer-grained controls over how and when the plugin runs would also help.

5. Improve documentation (8 users)

It shall be done, too – but don’t hold your breath. Writing documentation is… not an exciting pastime.

6. Add an option to recheck individual links (5 users)

This should be pretty straightforward to add; you can expect to see it added in the next release.

7. Ability to add rel=”nofollow” to certain links/posts/users (5 users)

Eventually.

8. Make fixing broken links easier (5 users)

There were several suggestions that amounted to this. Specifics ranged from sensible stuff like “add an option to replace the link with a cached page from web.archive.org” to things that would require a human-level artificial intelligence, like “figure out if the site is gone/down temporarily/moved to another address and offer suitable replacement links”. I’ll put the more practical suggestions on my to-do list.

9. Check comment links (4 users)

It shall be done; probably in the next major release or the one after that.

10. Add a way to mark some links as “broken, but that’s fine” (4 users)

Some users asked for a way to deal with false positives and links that really are broken, but might become live again after some time. The “Discard” button that can be used to manually mark the links as “working” might be a small step in the right direction, but it’s too much of a hack. I’ll look into ways to improve the situation.

11. Check YouTube/DailyMotion videos and other embedded media (3 users)

This is tricky. Perhaps in a future version.

12. Add an option to run the link checker manually (as opposed to periodically) (3 users)

It shall be done.

13. Display context in which the (broken) links appear (3 users)

Eventually.

14. Check links to file sharing sites like RapidShare and MegaUpload (2 users)

Tricky. See the comment about YouTube and embedded media above.

15. Add an option to edit link text from the plugin’s screen (2 users)

Eventually. Could be tricky – the same link can be used in multiple posts and thus have multiple anchor texts.

Q6 : If this plugin had a premium version, how much would you be willing to pay for it?

Bar chart : PriceWhile I’m not currently planning to create a premium version of Broken Link Checker, it is something that I might consider doing in the future. So I wanted see if there was any interest and how much (if anything) people would be willing to pay for a premium WP plugin.

As could be expected, most WordPress users care not for commercial plugins. Still, it looks like there might be a market for premium plugins in the $1 – $5 (16%) or the $5 – $10 range (11%). In total, 39% of users said they’d be willing to pay something for a premium version.

Q7 & Q8 : The Viralogy.com script… thing

I will discuss this one in a separate post later.

Q9 : Your PHP version?

Pie chart : PHP version

PHP 5 - 93%, PHP 4 - 7%

Well whad’ya know, WordPress might even be able to ditch PHP 4 support by 2015 or so.

Q10 : CURL library?

Pie chart : CURL library installed or not

Installed 79%, Not installed 21%

Q11 : Your WordPress version?

Bar chart : WordPress versions

WP 2.9.x - 91%

Note that this chart is biased by the fact that Broken Link Checker is only officially compatible with WP 2.8 and up. As a result, the chart may not represent the overall distribution of WordPress versions in the blogosphere.

Well, that’s it for today. Comments?


Copyright © 2010 W-Shadow.com. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@w-shadow.com so we can take legal action immediately.

Nothing to see here: How to Setup your Facebook Connect Application

February 1st, 2010

The majority of the email I get from users of the Simple Facebook Connect plugin is questions regarding how to setup their Facebook Application. It’s really not that hard to do, but the plethora of options can seem somewhat intimidating. So here’s the basics of what you need to do.

After creating your application, you’ll need to visit the Apps section in the Facebook Developer Home area. Here you’ll find your application, and the all critical “Edit Settings” link.

Main Application Screen

Firstly, never give out your Application Secret. If you give this out by accident, then use the Reset Secret Key link to get a new one.

Anyway, from here, you want to go into the settings. The settings area is divided into six main sections, but most of the settings are irrelevant. See, you’re building a “Connect” application, not a “Canvas” one. So most of these are meaningless for you. The following ones are what you actually care about:

Application name

Obviously, you want the name of your Application to make sense. I suggest using the same name as your website. You can even use your domain name here if you like. Just be aware that this name is what the Fans of your site will see in their Applications area.

Basic Information

The Basic Information section is important as well, fill it in as you see fit. I also recommend uploading good icons and/or logos for your site. Gives it that finished look.

Contact Information

Contact Information is obviously important as well, but don’t worry about all those extra URLs. They really apply more to Canvas apps. Of course, if you want to make special pages on your site for them and provide the URLs here, feel free.

Authentication Settings

The Authentication Settings page is surprisingly important. Those top two boxes need to be unchecked for a Facebook Connect application. Why? Because when they are unchecked, your Application becomes an “External Website” as far as Facebook is concerned. If you have either them checked, then your app’s Canvas section becomes active and you might have users trying to add it to their profiles and such, resulting in broken pages and a general bad user experience.

Connect Settings

The Connect Settings page is probably the most important one. These settings must be filled in and they must be absolutely accurate. Specifically, the URLs must be the URLs that are actually used by your site. Capitalization matters. The leading “www” or lack of one matters. Whatever the URL your site is in the browser is what you MUST put into these fields. Anything less and your site will not work.

Advanced Settings

The Advanced Settings screen contains these three fields which you need to set in the same way I did. The email domain should be your own domain, obviously. This field must be filled in for you to get real user emails on your Connected site. Without this, you only get proxied emails through Facebook.

Application Profile

Finally, after you have saved those settings, take the time to go back to the main application screen and click the “Edit Application Profile” link. You’ll be taken here, where you can set up the “look” of your application page on Facebook. This includes what tabs are visible, the stuff in the Info section, etc. You can add extra Applications tabs to this page and generally customize all sorts of stuff. None of that affects your site, but it does affect how the App Page looks in Facebook. The more polished it is, the more likely people will “Fan” your Application. And Fans get updates from when you publish posts to the Wall. Great way to drive traffic to your content.

Hope this helps! Mainly, I hope this reduces the number of questions I get about this process. Enjoy SFC!