<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex Mansfield</title>
	<atom:link href="http://alexmansfield.com/feed" rel="self" type="application/rss+xml" />
	<link>http://alexmansfield.com</link>
	<description>WordPress Developer</description>
	<lastBuildDate>Tue, 28 Feb 2012 23:24:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Font-size and Line-height for &lt;pre&gt;, &lt;code&gt;, and Other Monospaced Fonts</title>
		<link>http://alexmansfield.com/css/font-size-line-height-pre-code-monospace</link>
		<comments>http://alexmansfield.com/css/font-size-line-height-pre-code-monospace#comments</comments>
		<pubDate>Sat, 25 Feb 2012 01:58:55 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=684</guid>
		<description><![CDATA[While attempting to create a consistent cross-browser font baseline, I ran into the following strange behaviour in certain browsers (not IE for once!). Any monospaced font was rendered smaller than the surrounding text, even when specifically set to display at 1em. I found this to be true in both Firefox and Chrome. After a bit [...]]]></description>
			<content:encoded><![CDATA[<p>While attempting to create a consistent cross-browser font baseline, I ran into the following strange behaviour in certain browsers (not IE for once!). Any monospaced font was rendered smaller than the surrounding text, even when specifically set to display at 1em. I found this to be true in both Firefox and Chrome. After a bit of searching, I found that these browsers also contain a strange bug, although in this case it almost becomes a feature. If the font-family is set to monospace twice, suddenly the font displays at the proper size:</p>
<pre class="brush: css; title: ; notranslate">pre, code, kbd, samp, tt, textarea{
	font-family: monospace, monospace;
}</pre>
<p>However, in Chrome, this threw off the line height, which ruined the vertical rhythm I was working to create. After some trial and error, I discovered that setting the vertical-align property to &#8220;top&#8221; took care of the problem. I&#8217;ll be the first to admit that this isn&#8217;t the most elegant solution, but as far as I can tell, it works in every modern browser. Here is my final code:</p>
<pre class="brush: css; title: ; notranslate">pre, code, kbd, samp, tt, textarea{
	font-family: monospace, monospace;
	vertical-align: top;
}</pre>
<p>Please let me know if you find any browsers that don&#8217;t render this properly. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/css/font-size-line-height-pre-code-monospace/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS vs jQuery: Screen Widths and Scrollbars</title>
		<link>http://alexmansfield.com/javascript/css-jquery-screen-widths-scrollbars</link>
		<comments>http://alexmansfield.com/javascript/css-jquery-screen-widths-scrollbars#comments</comments>
		<pubDate>Sat, 21 Jan 2012 23:22:27 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Responsive]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=676</guid>
		<description><![CDATA[Update: The first piece of code had an unexpected side effect that is addressed in the update at the bottom of this post. CSS media queries and jQuery window width calculations each handle scrollbars differently. This can cause unexpected (and ugly) results when they are used together. I was recently building a responsive menu system [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> The first piece of code had an unexpected side effect that is addressed in the update at the bottom of this post.</p>
<p>CSS media queries and jQuery window width calculations each handle scrollbars differently. This can cause unexpected (and ugly) results when they are used together. I was recently building a responsive menu system that relied on CSS media queries to create a vertical menu for small screens, such as mobile devices. I then used a jQuery width measurement to determine whether or not to create a button for toggling the visibility of the vertical menus. However, I was in for a nasty surprise. Unfortunately, when a CSS media query measures the width of the window it includes the width of the scrollbar. On the other hand, when jQuery measures the width of the window it does not include the width of the scrollbar. When there was no vertical scrollbar, both my CSS media query and jQuery function would fire at the same window size. However, when the page content was long enough to require a scrollbar, the jQuery function would fire first. Eventually, I realized that I could disable scrolling momentarily while I placed the window width into a variable for use later in the script. Here is what it looks like:</p>
<pre class="brush: jscript; title: ; notranslate">jQuery('body').css('overflow', 'hidden');
jQuery('html').css('overflow-y', 'hidden');
var window_width = jQuery(window).width();
jQuery('body').css('overflow', 'auto');
jQuery('html').css('overflow-y', 'auto');</pre>
<p><strong>Update:</strong> After working with this section of code for a time, I realized that setting &#8220;overflow&#8221; to hidden caused the page to jump to the top whenever the page was reloaded or the window was resized. So I set off across the internet in search of a script that would measure the width of the scroll bar, rather than measuring the width of the window without the scroll bar. That is how I came across <a href="http://jdsharp.us/jQuery/minute/calculate-scrollbar-width.php" title="Calculate Scrollbar Width">this script by Jonathan Sharp</a>. However, I didn&#8217;t need to know the scrollbar width on short pages that didn&#8217;t scroll, so I modified it to only return a value when a scrollbar is present on the page.</p>
<pre class="brush: jscript; title: ; notranslate">/* Calculates scrollbar width in pixels */
function scrollbar_width() {
	if( jQuery('body').height() &gt; jQuery(window).height()) {

		/* Modified from: http://jdsharp.us/jQuery/minute/calculate-scrollbar-width.php */
		var calculation_content = jQuery('&lt;div style=&quot;width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;&quot;&gt;&lt;div style=&quot;height:100px;&quot;&gt;&lt;/div&gt;');
		jQuery('body').append( calculation_content );
		var width_one = jQuery('div', calculation_content).innerWidth();
		calculation_content.css('overflow-y', 'scroll');
		var width_two = jQuery('div', calculation_content).innerWidth();
		jQuery(calculation_content).remove();
		return ( width_one - width_two );
	}
	return 0;
}</pre>
<p>This can then be added to the window width to get the full width of the window including the scrollbar:</p>
<pre class="brush: jscript; title: ; notranslate">var window_width = jQuery('body').width() + scrollbar_width();</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/javascript/css-jquery-screen-widths-scrollbars/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change Default Media Settings on Theme Activation</title>
		<link>http://alexmansfield.com/wordpress/media-settings-theme-activation</link>
		<comments>http://alexmansfield.com/wordpress/media-settings-theme-activation#comments</comments>
		<pubDate>Thu, 03 Nov 2011 18:06:43 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=649</guid>
		<description><![CDATA[Let&#8217;s face it, if you&#8217;re a developer you want to make things as simple as possible for your clients. One way to do this is to set the default media sizes when your theme is activated. Your users should never need to try to figure out the width of the content area. They shouldn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s face it, if you&#8217;re a developer you want to make things as simple as possible for your clients. One way to do this is to set the default media sizes when your theme is activated. Your users should never need to try to figure out the width of the content area. They shouldn&#8217;t have find where the default settings are located. They shouldn&#8217;t have to worry about any of that. When they upload an image or use an embed code, the correct sizes should already be set. Here&#8217;s how you can do that for them.</p>
<p><span id="more-649"></span></p>
<pre class="brush: php; title: ; notranslate">// Reset default media sizes
if ( is_admin() &amp;&amp; isset( $_GET['activated'] ) &amp;&amp; $pagenow == 'themes.php' ){
	global $wpdb;
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='200' WHERE option_name='thumbnail_size_w'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='200' WHERE option_name='thumbnail_size_h'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='1' WHERE option_name='thumbnail_crop'&quot;);

	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='400' WHERE option_name='medium_size_w'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='400' WHERE option_name='medium_size_h'&quot;);

	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='800' WHERE option_name='large_size_w'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='800' WHERE option_name='large_size_h'&quot;);

	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='800' WHERE option_name='embed_size_w'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='0' WHERE option_name='embed_size_h'&quot;);
	$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;options SET option_value='1' WHERE option_name='embed_autourls'&quot;);
}</pre>
<p>This piece of code goes in the functions.php file of the theme. When the theme is activated, it sets all the default media sizes available on the Settings > Media page. Feel free to remove any lines that you don&#8217;t need. Then change the remaining values to fit the size of your theme and you&#8217;re ready to go! </p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/wordpress/media-settings-theme-activation/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Taxonomy Tabs</title>
		<link>http://alexmansfield.com/wordpress/wordpress-taxonomy-tabs</link>
		<comments>http://alexmansfield.com/wordpress/wordpress-taxonomy-tabs#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:47:26 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=628</guid>
		<description><![CDATA[Jason Schuller of Press75.com mentioned on Twitter yesterday that the taxonomy UI in the WordPress admin could use some improvement. I thought that sounded like a good idea, so I went about figuring out how such a change could be made. In the end, it took three sections of code, all of which can be [...]]]></description>
			<content:encoded><![CDATA[<p>Jason Schuller of <a title="Press 75" href="http://press75.com/">Press75.com</a> mentioned on Twitter yesterday that the taxonomy UI in the WordPress admin could use some improvement.</p>
<!-- tweet id : 131088144706707456 --><style type='text/css'>#bbpBox_131088144706707456 a { text-decoration:none; color:#7d7d7d; }#bbpBox_131088144706707456 a:hover { text-decoration:underline; }</style><div id='bbpBox_131088144706707456' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#19191b; background-image:url(http://a0.twimg.com/profile_background_images/305736835/bg.jpg);'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#666666; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>In regards to custom taxonomies, it would be nice to have just one tabbed box within the editor instead a separate box for each taxonomy.</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://alexmansfield.com/wpress/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on October 31, 2011 7:20 pm' href='http://twitter.com/#!/jschuller/status/131088144706707456' target='_blank'>October 31, 2011 7:20 pm</a> via <a href="http://twitterrific.com" rel="nofollow" target="blank">Twitterrific for Mac</a><a href='https://twitter.com/intent/tweet?in_reply_to=131088144706707456' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=131088144706707456' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=131088144706707456' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=jschuller'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a0.twimg.com/profile_images/1440849860/jason-cropped_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=jschuller'>@jschuller</a><div style='margin:0; padding-top:2px'>Jason Schuller</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<p>I thought that sounded like a good idea, so I went about figuring out how such a change could be made. <span id="more-628"></span> In the end, it took three sections of code, all of which can be placed within your theme&#8217;s functions.php file if you&#8217;re hoping to test it out. Ideally, this change belongs in a plugin rather than a theme file, but I&#8217;m not going to get into that discussion today. Here&#8217;s the first section of code:</p>
<pre class="brush: php; title: ; notranslate">// Load the jQuiry UI tabs script
wp_enqueue_script( 'jquery-ui-tabs' );</pre>
<p>All it does is load the jQuery UI tabs script that will help us create the taxonomy tabs. The file itself is packaged with WordPress, so we don&#8217;t have to specify where it resides. Next we have the script that creates the tabbed taxonomies area.</p>
<pre class="brush: php; title: ; notranslate">// Create new taxonomy tabs box and move current taxonomies into the new box
function custom_scripts() {
	?&gt;
		&lt;script type='text/javascript'&gt;
			jQuery(document).ready(function() {
				if(jQuery('.categorydiv').length != 0){
					var element = jQuery('&lt;div id=&quot;tax-tabs&quot; class=&quot;postbox&quot;&gt;&lt;h3 class=&quot;hndl&quot;&gt;Taxonomies&lt;/h3&gt;&lt;div id=&quot;tabs&quot;&gt;&lt;ul id=&quot;tab-nav&quot;&gt;&lt;/ul&gt;&lt;div id=&quot;tax-tabs-inside&quot; class=&quot;inside&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');
					jQuery(element).appendTo('#side-sortables');
					jQuery('.categorydiv').each(function(index) {
						jQuery(this).parents('.postbox').css('display', 'none');
						var title = jQuery(this).parents('.postbox').children('.hndle').children('span').html();
						var slug = jQuery(this).parents('.postbox').attr('ID');
						var slug = slug.replace('div', '');
						jQuery('&lt;li&gt;&lt;a href=&quot;#taxonomy-' + slug + '&quot;&gt;' + title + '&lt;/a&gt;&lt;/li&gt;').appendTo('#tab-nav');
						jQuery(this).appendTo('#tax-tabs-inside');
					});

					jQuery(function() {
						jQuery( &quot;#tabs&quot; ).tabs();
					});
				}
			});
		&lt;/script&gt;
	&lt;?php
}
add_action('admin_head', 'custom_scripts');</pre>
<p>This function writes out the Javascript involved with adding a new section to the WordPress page/post editor. It begins by checking if any taxonomies exist (keep in mind that &#8220;Categories&#8221; are a built-in taxonomy). If there are, the taxonomy box is displayed. After this, we loop through all the &#8220;.categorydiv&#8221; elements and move them into our new taxonomy box, writing the tabbed navigation as we go. Finally, we need to add a few styles so that the tabs look like tabs and the whole box blends with the default WordPress experience:</p>
<pre class="brush: php; title: ; notranslate">// Style new taxonomy tabs
function custom_styles() {
	?&gt;
		&lt;style type=&quot;text/css&quot;&gt;
			.ui-tabs-nav{
				background: #ededed;
				border-bottom: 1px solid #dfdfdf !important;
				margin-top: -6px !important;
				padding: 0 0 0 9px !important;
			}
			.ui-tabs-nav a{
				display:block;
				float:left;
				padding: 5px;
				margin:5px 0 0 0;
				text-decoration:none;
				}
			.ui-tabs-nav .ui-tabs-selected a{
				background: #f9f9f9;
				border: 1px solid #dfdfdf;
				border-bottom:0;
				color: #333;
				margin-bottom: -1px;
				-moz-border-radius: 3px 3px 0px 0px;
				-webkit-border-radius: 3px 3px 0px 0px;
				border-radius: 3px 3px 0px 0px;
			}
		&lt;/style&gt;
	&lt;?php
}
add_action('admin_head', 'custom_styles');</pre>
<p>Please note: I have only tested this in Firefox and Chrome. There may be CSS issues with Internet Explorer. If you run into any difficulties setting this up, feel free to speak up in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/wordpress/wordpress-taxonomy-tabs/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple CSS Drop Down Menus</title>
		<link>http://alexmansfield.com/css/simple-css-drop-down-menus</link>
		<comments>http://alexmansfield.com/css/simple-css-drop-down-menus#comments</comments>
		<pubDate>Sat, 29 Oct 2011 21:58:22 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=616</guid>
		<description><![CDATA[I was building a drop down menu while working on a personal project and I decided to see how lightweight I could make it. This is a pure CSS drop down menu, no Javascript is used. Only 50 lines of generously spaced CSS were needed to create a cross-browser drop down menu and the entire [...]]]></description>
			<content:encoded><![CDATA[<p>I was building a drop down menu while working on a personal project and I decided to see how lightweight I could make it. This is a pure CSS drop down menu, no Javascript is used. Only 50 lines of generously spaced CSS were needed to create a cross-browser drop down menu and the entire <a href="http://alexmansfield.com/demos/cssmenu/" title="CSS Menu Demo">demo file</a> weighs in at just over 1kb. It uses the same HTML structure as the default WordPress menu system, so it can easily be used in WordPress themes as well.  <span id="more-616"></span></p>
<p>Here is the HTML:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;nav-primary&quot;&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Level 1&lt;/a&gt;
			&lt;ul&gt;
				&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Level 2&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href=&quot;#&quot;&gt;More Level 2&lt;/a&gt;
					&lt;ul&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Level 3&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot;&gt;More Level 3&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;&lt;a href=&quot;#&quot;&gt;More Level 2 Again&lt;/a&gt;
					&lt;ul&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Other Level 3&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Other Level 3 Again&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Lorem Ipsum&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>As you can see, the HTML is just a simple list based menu structure. Each sub-menu is contained within the list item of the parent. This is required for hover states to work properly.</p>
<p>The CSS is nearly as simple as the HTML:</p>
<pre class="brush: css; title: ; notranslate">
#nav-primary{
	background: #444;
	height: 40px;
}

#nav-primary ul{
	background: #444;
	list-style: none;
	margin: 0;
	padding: 0;
}

#nav-primary li{
	float: left;
	position:relative;
}

#nav-primary a{
	color: #fff;
	display: block;
	height: 40px;
	line-height: 40px;
	padding: 0 10px;
	text-decoration: none;
}

#nav-primary a:hover{
	background: #555;
}

#nav-primary ul ul{
	display:none;
	position: absolute;
	top: 40px;
	left: 0;
	width: auto;
}

#nav-primary ul ul li{
	width: 200px;
}

#nav-primary ul li:hover &gt; ul {
	display: block;
}

#nav-primary ul ul ul {
	left: 100%;
	top: 0;
}
</pre>
<p>I have tested this menu with IE 7 and 8, Firefox 7, Chrome 14, Opera 11, and Safari 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/css/simple-css-drop-down-menus/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting the Default Editor for a Custom Post Type</title>
		<link>http://alexmansfield.com/wordpress/default-editor-custom-post-type</link>
		<comments>http://alexmansfield.com/wordpress/default-editor-custom-post-type#comments</comments>
		<pubDate>Fri, 07 Oct 2011 20:33:59 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=595</guid>
		<description><![CDATA[Recently I was working on a project where I was writing some PHP and HTML source code documentation and publishing it via WordPress. As you may know, the WordPress visual editor isn&#8217;t ideal when it comes to handling such code. Consequently, I went looking for a way to set the default editor to HTML rather [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a project where I was writing some PHP and HTML source code documentation and publishing it via WordPress. As you may know, the WordPress visual editor isn&#8217;t ideal when it comes to handling such code. Consequently, I went looking for a way to set the default editor to HTML rather than Visual. However, I didn&#8217;t want to cause the HTML editor to be the default across the entire site, so I created a custom post type for my code documentation. Then I changed the default editor for only that post type with the following piece of code:</p>
<pre class="brush: php; title: ; notranslate">add_filter('wp_default_editor', 'set_default_editor');

function set_default_editor( $type ) {
    global $post_type;
    if('code-doc' == $post_type)
        return 'html';
    return $type;
}</pre>
<p>All you need to do to use this piece of code is change &#8220;code-doc&#8221; to reflect the name of your custom post type.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/wordpress/default-editor-custom-post-type/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin Template</title>
		<link>http://alexmansfield.com/plugins/wordpress-plugin-template</link>
		<comments>http://alexmansfield.com/plugins/wordpress-plugin-template#comments</comments>
		<pubDate>Wed, 15 Jun 2011 02:10:35 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=575</guid>
		<description><![CDATA[I&#8217;ve started developing WordPress plugins from scratch too many times. I don&#8217;t enjoy repeating the setup process for every plugin I develop, so I&#8217;ve created a default plugin template that has all the basics included. Enjoy! Download Plugin Template 1.1]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started developing WordPress plugins from scratch too many times. I don&#8217;t enjoy repeating the setup process for every plugin I develop, so I&#8217;ve created a default plugin template that has all the basics included. Enjoy!</p>
<p><a href='http://alexmansfield.com/wpress/wp-content/uploads/2011/06/plugin-template-1.1.zip'>Download Plugin Template 1.1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/plugins/wordpress-plugin-template/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The WordPress &#8220;More&#8221; Tag</title>
		<link>http://alexmansfield.com/blogging/wordpress-more-tag</link>
		<comments>http://alexmansfield.com/blogging/wordpress-more-tag#comments</comments>
		<pubDate>Fri, 10 Jun 2011 06:29:22 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=567</guid>
		<description><![CDATA[Those of you who know WordPress like the back of your hand, please feel free to skip this post. It is simply an explanation of the &#8220;More&#8221; tag used by WordPress post editor. The &#8220;More&#8221; tag is used to let WordPress know just how much of each post should be displayed on multiple post pages [...]]]></description>
			<content:encoded><![CDATA[<p>Those of you who know WordPress like the back of your hand, please feel free to skip this post. It is simply an explanation of the &#8220;More&#8221; tag used by WordPress post editor. The &#8220;More&#8221; tag is used to let WordPress know just how much of each post should be displayed on multiple post pages (for example: the home page, category pages, tag pages, search pages, etc. where you might not want to display the entire post). WordPress will start at the beginning of a post and display everything until it runs into the &#8220;More&#8221; tag. When it reaches the &#8220;More&#8221; tag, it will insert a &#8220;Continue Reading&#8230;&#8221; link and move on to the next post. Just below this paragraph there is a screen shot of the &#8220;More&#8221; tag in action. The upper circle is surrounding the &#8220;More&#8221; button, while the lower circle is demonstrating the visible result of the &#8220;More&#8221; button from within the post editor. To use the more tag, simply place your cursor at the desired location and click the &#8220;More&#8221; button. Easy as that!</p>
<p><a href="http://alexmansfield.com/wpress/wp-content/uploads/2011/06/more.jpeg"><img class="alignnone size-full wp-image-569" title="more" src="http://alexmansfield.com/wpress/wp-content/uploads/2011/06/more.jpeg" alt="" width="700" height="280" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/blogging/wordpress-more-tag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Year Two</title>
		<link>http://alexmansfield.com/progress/year-two</link>
		<comments>http://alexmansfield.com/progress/year-two#comments</comments>
		<pubDate>Thu, 02 Jun 2011 04:33:53 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=541</guid>
		<description><![CDATA[Today marks exactly two years since I started this website. Once again, I didn&#8217;t post nearly as often as I had hoped. Life away from the keyboard keeps interrupting, but I wouldn&#8217;t have it any other way. Statistics Here&#8217;s a quick rundown of the blog this year: Blog posts: 8 Visits: 8,649 Visitors: 7,537 Pageviews: [...]]]></description>
			<content:encoded><![CDATA[<p>Today marks exactly two years since I started this website. Once again, I didn&#8217;t post nearly as often as I had hoped. Life away from the keyboard keeps interrupting, but I wouldn&#8217;t have it any other way.</p>
<h2>Statistics</h2>
<p>Here&#8217;s a quick rundown of the blog this year:</p>
<ul>
<li>Blog posts: 8</li>
<li>Visits: 8,649</li>
<li>Visitors: 7,537</li>
<li>Pageviews: 11,670</li>
<li>Avg. time on the site: 0:48</li>
<li>Backlinks (as measured by Yahoo): 210</li>
<li>Google Pagerank: 3</li>
</ul>
<p>I didn&#8217;t even post once a month, but visits, vistors, and pageviews more than doubled since last year. Average time on site decreased by about 5 seconds though. Over 75% of my visitors are finding my site through a search engine, while only 10% are coming from referring sites. It&#8217;s nice to know people are searching for topics I&#8217;ve written about, but I&#8217;d like to bring up the percentage of people who find me through other sites who have linked to me because of content that they found helpful or worthwhile. My backlink count grew by just 35 this year and my Google pagerank actually dropped from 4 to 3. I won&#8217;t be in school this year, so I might finally get back to blogging a little more often.</p>
<h2>Goals</h2>
<p>I set a few goals in my <a title="Year One" href="http://alexmansfield.com/progress/one-year">one year review post</a>, and now that year two is behind me, it&#8217;s time to review them.</p>
<ol>
<li><strong>Re-brand <a href="http://sackclothstudios.com/">Sackcloth Studios</a> (my web design and development business).</strong> Mission accomplished! The new site is live and I <a href="http://alexmansfield.com/wordpress/sackcloth-redesign">documented the whole process</a>.</li>
<li><strong>Build the <a href="http://trustypress.com/">Trusty Press</a> brand.</strong> This didn&#8217;t happen at all. In fact, I just began the process of closing down the web hosting arm of Trusty Press (and that was its only arm). However, I do have an idea or two regarding where I&#8217;d like to take it in the future.</li>
<li><strong>Complete another WordPress plugin</strong>. Done and done! I actually wrote two more plugins this year and they can both be found in the WordPress.org plugin repository.</li>
</ol>
<ul>
<li><a title="Easy Embed" href="http://wordpress.org/extend/plugins/easy-embed/">Easy Embed</a> &#8211; A simple plugin allowing anything to be embedded in the editor via a shortcode in order to keep WordPress from messing with it.</li>
<li><a title="Simple Slide Show" href="http://wordpress.org/extend/plugins/simple-slide-show/">Simple Slide Show</a> &#8211; Upload a batch of images via FTP. Place them all in a slide show with the ease of a simple shortcode.</li>
</ul>
<p>Two out of three isn&#8217;t bad. Now on to a few of the things I&#8217;d like to accomplish this year:</p>
<ol>
<li>Release a commercial WordPress theme.</li>
<li>Get <a title="Trusty Press" href="http://trustypress.com">Trusty Press</a> running again, this time in a new direction.</li>
<li>Make <a title="Theme Signal" href="http://themesignal.com">Theme Signal</a> a valuable resource for locating the perfect WordPress theme.</li>
</ol>
<p>Well, it looks like that&#8217;s all for now. See you in a year :]</p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">
<p><span class="primary_value"> </span></p>
<ul>
<li class="item_value"> 8,649</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/progress/year-two/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delicious Bookmarks and Firefox 4</title>
		<link>http://alexmansfield.com/hacks/delicious-firefox-4</link>
		<comments>http://alexmansfield.com/hacks/delicious-firefox-4#comments</comments>
		<pubDate>Wed, 25 May 2011 19:48:54 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=524</guid>
		<description><![CDATA[For those of you who are really missing your Delicious bookmarks after upgrading to Firefox 4 (or who haven&#8217;t upgraded because there is no Delicious add-on yet), there is a solution! First, go to the Delicious add-on page, click the &#8220;Continue to Download&#8221; button. Then, instead of simply clicking the &#8220;Accept and Install&#8221; button, right [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who are really missing your Delicious bookmarks after upgrading to Firefox 4 (or who haven&#8217;t upgraded because there is no Delicious add-on yet), there is a solution! First, go to the Delicious add-on page, click the &#8220;Continue to Download&#8221; button. Then, instead of simply clicking the &#8220;Accept and Install&#8221; button, right click it and save the resulting XPI file. For all practical purposes, an XPI file is simple a ZIP folder for Firefox add-ons. You&#8217;ll need to open that folder and make a few changes. First, open the install.rdf file with a text editor and find this line:</p>
<pre class="brush: xml; title: ; notranslate">em:maxVersion=&quot;4.0b3pre&quot; /&gt;</pre>
<p>This is what is keeping the add-on from installing properly. To allow the add-on to be installed on any version of Firefox 4.0, you&#8217;ll need to use this line instead:</p>
<pre class="brush: xml; title: ; notranslate">em:maxVersion=&quot;4.0.*&quot; /&gt;</pre>
<p>Make sure you save the the changes you&#8217;ve made. Next, delete the entire &#8220;META-INF&#8221; folder from within the XPI folder. It holds the checksums of the original add-on. Now that we&#8217;ve modified the install.rdf file, the checksums are wrong. Removing the &#8220;META-INF&#8221; folder will take care of that. Now open Firefox and go to &#8220;File &gt; Open File&#8230; &#8221; Then find your newly modified Delicious XPI file and open it. This should bring up the dialog box for installing Firefox add-ons. After restarting your browser, you should be greeted by a fully functioning Delicious add-on running on Firefox 4!</p>
<p>Update: It has come to my attention that there is also a beta version of the plugin with Firefox 4 support: <a href="https://addons.mozilla.org/en-US/firefox/addon/delicious-extension/">https://addons.mozilla.org/en-US/firefox/addon/delicious-extension/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/hacks/delicious-firefox-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

