<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jeremy Hixon</title>
	
	<link>http://jeremyhixon.com</link>
	<description>User Experience, Front End Developer</description>
	<lastBuildDate>Wed, 27 Mar 2013 15:35:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2-alpha</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JeremyHixon" /><feedburner:info uri="jeremyhixon" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>JeremyHixon</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Optimize WordPress Loading Time</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/VutoeoGKtfI/</link>
		<comments>http://jeremyhixon.com/optimize-wordpress-loading-time/#comments</comments>
		<pubDate>Sun, 17 Feb 2013 20:43:07 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[load time]]></category>
		<category><![CDATA[minification]]></category>
		<category><![CDATA[minify]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[pagespeed]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yslow]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=1259</guid>
		<description><![CDATA[<p>Something that goes without saying is that the load time of a page is important. Google takes load time into consideration with it&#8217;s indexing algorithems. It&#8217;s not as big of a consideration as say, relevance, but it matters. In the grand scheme of things, what do a few seconds matter? Turns out they could matter [...]</p><p>The post <a href="http://jeremyhixon.com/optimize-wordpress-loading-time/">Optimize WordPress Loading Time</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Something that goes without saying is that the load time of a page is important. <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html" target="_blank">Google takes load time into consideration</a> with it&#8217;s indexing algorithems. It&#8217;s not as big of a consideration as say, relevance, but it matters. In the grand scheme of things, what do a few seconds matter? Turns out they could matter quite a lot.<span id="more-1259"></span></p>
<blockquote><p>According to <a href="http://blog.kissmetrics.com/loading-time/" target="_blank">surveys done by Akamai and Gomez.com</a>, nearly half of web users expect a site to load in 2 seconds or less, and they tend to abandon a site that isn&#8217;t loaded within 3 seconds.</p></blockquote>
<p>If that&#8217;s the case, then sites with a lot of content running off of a CMS would probably be advised to minimize the size and number of requests being made to load their pages. That&#8217;s where this article comes in. I&#8217;ve recently redesigned my own site while still using WordPress and at the end of the process spent some time doing just that, minimizing requests.</p>
<h2>Database Requests in Themes</h2>
<p>If you&#8217;re developing a theme for mass distribution then it&#8217;s going to be difficult for you to cover all the possibilities that might be required of a theme and cut down on database requests. If, however, you have purchased a theme or are developing your own you can do your best to reduce the number of times your theme needs to make a request of the database. One of my favorite ways to do this is by reducing the number of times you call <code>bloginfo()</code>.</p>
<p>If you think about the number of times a theme might need to use this function it can get rather extensive. There are parts of the <code>&lt;head&gt;</code> that will only call it once, like charset, and there are parts that you&#8217;ll need over and over again like &#8216;stylesheet_directory&#8217;. These parts in particular can be lessened by storing those parts in a variable or in an array and reusing that instead of making the call every time you need it.</p>
<p>Below is a sample of some code at the top of my <code>functions.php</code> file:</p>
<pre class="brush: php; gutter: true; first-line: 1; highlight: []; html-script: false">// ===============================
// Reducing database calls
// http://jeremyhixon.com/sandbox/snippet/reducing-database-calls-using-bloginfo/
//
// Global variable used to reduce database queries on values commonly requested in themes.
// Use &quot;global $bloginfo;&quot; at the beginnng of any theme file and/or function to be able to access the values.
// ===============================
global $bloginfo;
$bloginfo = array(
	&#039;name&#039; =&gt; get_bloginfo(&#039;name&#039;),
	&#039;description&#039; =&gt; get_bloginfo(&#039;description&#039;),
	&#039;admin_email&#039; =&gt; get_bloginfo(&#039;admin_email&#039;),
	&#039;wpurl&#039; =&gt; get_bloginfo(&#039;wpurl&#039;),
	&#039;stylesheet_directory&#039; =&gt; get_bloginfo(&#039;stylesheet_directory&#039;),
	&#039;stylesheet_url&#039; =&gt; get_bloginfo(&#039;stylesheet_url&#039;),
	&#039;rss2_url&#039; =&gt; get_bloginfo(&#039;rss2_url&#039;),
	&#039;charset&#039; =&gt; get_bloginfo(&#039;charset&#039;),
	&#039;language&#039; =&gt; get_bloginfo(&#039;language&#039;),
	&#039;text_direction&#039; =&gt; get_bloginfo(&#039;text_direction&#039;)
);</pre>
<p>This code creates a <code>$bloginfo</code> array that I can load at the top of every one of my theme files by stating <code>global $bloginfo;</code> and then use it as many times as I need without creating any additional database queries. This can certainly be trimmed to suit your needs. As I said before things like &#8216;charset&#8217;, &#8216;language&#8217; and &#8216;text_direction&#8217; will only be used once if at all.</p>
<h2>Compression, Expires and Caching</h2>
<p>A few more server side tweaks here, this time using Apache. In this instance we&#8217;re using a little gzip compression and some Apache settings to control when the browser updates it&#8217;s copy of the files we&#8217;re using in our theme. These tweaks are super easy, as long as your server is configured correctly, as they all take place in the <code>.htaccess</code> file.</p>
<h3>Gzip Compression with mod_deflate</h3>
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false"># Use Mod_deflate to compress static files
&lt;ifmodule mod_deflate.c&gt;
&lt;filesmatch &quot;.(js|css|ico|txt|htm|html|php)$&quot;&gt;
SetOutputFilter DEFLATE
&lt;/filesmatch&gt;
&lt;/ifmodule&gt;</pre>
<p>The above code checks for the mod_deflate module and then, if it exists, runs through all the files that should be static on your site and sends them through the &#8220;DEFLATE&#8221; filter. This will, essentially, compress them before sending them to the browser. In my case I included all my JavaScript, CSS, icons, text, HTML and PHP files.</p>
<h3>Expires</h3>
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;IfModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault &quot;access plus 1 year&quot;
&lt;/IfModule&gt;</pre>
<p>Above, we&#8217;re sending a note to the browser informing it that after it&#8217;s downloaded files from our server that it won&#8217;t need to download them again for another year. What&#8217;s up there is a very harsh setup as it&#8217;s not specific to any one kind of file. But that&#8217;s what I use on my CDN to speed things up. You may also set specific rules for specific mime types such as:</p>
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false">ExpiresByType application/javascript &quot;access plus 1 week&quot;</pre>
<h3>Caching</h3>
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;IfModule mod_headers.c&gt;
&lt;FilesMatch &quot;\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf|tif|tiff)$&quot;&gt;
Header set Last-Modified &quot;Mon, 31 Aug 2009 00:00:00 GMT&quot;
&lt;/FilesMatch&gt;
&lt;/IfModule&gt;</pre>
<p>Here we&#8217;re setting the &#8220;last-modified&#8221; header for any of the files that fit into the <code>FilesMatch</code> parameter to a date very far in the past. This gives the browser the impression that the file hasn&#8217;t changed in some time and, thus, doesn&#8217;t need to download it again once it has it stored locally. The targeted files in this case are media files that, typically, don&#8217;t change, like images and videos.</p>
<h2>Optimize Images</h2>
<p>One of the more mundane aspects but also one of the more essential and certainly one of the most often overlooked tweaks is image optimization. Photoshop has it&#8217;s &#8220;Save for Web&#8221; dialog. When you upload an image through WordPress&#8217; media manager it gives you a status during the process of &#8220;crunching&#8221;. But I&#8217;m not just dead sure that this is enough. When it comes to really squeezing the last little bit of file size out of an image I only use one tool, <a href="http://imageoptim.com/" target="_blank">ImageOptim</a>.</p>
<p>Even a file that&#8217;s been &#8220;saved for web&#8221; and &#8220;crunched&#8221; will be further reduced in size by ImageOptim. It finds the optimal compression format for your image and also removes comments and color profiles. It works with PNGs, JPEGs and even GIFs.</p>
<h3>Polyfills</h3>
<p>Another great way to minimize the request size, polyfills are something I initially began considering because of a &#8220;mobile first&#8221; website I was developing. The one I have been using is called <a href="https://github.com/scottjehl/picturefill" target="_blank">Picturefill by Scott Jehl</a>. What Picturefill essentially does is take advantage of media queries to look at the size of the viewport loading your site and then load an image appropriate to that size. There is no image loaded initially so if the user visits on a mobile device with a very small screen Picturefill will load a much smaller image. This takes less time to load, and thus, speeds up your site.</p>
<h2>Combining CSS and JS Files</h2>
<p>More on the front side of things we have our many, many stylesheets and javascript files. WordPress is notorious for plugins and plugins are notorious for having their own styles and scripts. It might take some work to clean all these up but the benefits are astounding.</p>
<h3>CSS</h3>
<p>Log out of your WordPress site so that you see what your readers get when they visit your site. View the source of your page and take a look at the <code>&lt;head&gt;</code> of the page. Make a note of all the <code>&lt;link rel="stylesheet"&gt;</code> references you see. Create a file called <code>style.combined.css</code> in your theme folder, wherever you like to put your CSS files. This will serve as the point where we consolidate all of our CSS files into one.</p>
<p>Go through each of the stylesheets you found and copy/paste them into the file you created. Try and keep them in the order they are in the source if you can as well. That will keep you from having any unfortunate and unexpected styling changes when you&#8217;re done.</p>
<p>After combining all the CSS into one file it&#8217;s time to go through and remove all the stylesheets you were pulling from. This could be time consuming. Some plugins like <a href="http://wordpress.org/extend/plugins/contact-form-7/" title="Contact Form 7 - WordPress Contact Form Plugin">Contact Form 7</a> have globals that you can set to turn off the inclusion of it&#8217;s included stylesheets and scripts. Most will probably not have such an option so you&#8217;ll have to remove them yourself. If you follow the instructions on <a href="http://www.stephanmuller.nl/removing-wordpress-plugin-style-scripts-head/" title="Remove plugin styles and scripts from (WordPress)" target="_blank">this article</a> it should prove fruitful. If after following the steps in that article you still have styles that won&#8217;t go away, you may have to dig around in the plugin files themselves to remove them. If you can avoid this I would because as soon as you update that plugin next the style will, most likely, come back.</p>
<p>Once you&#8217;ve cleaned up the styles add in your <code>style.combined.css</code> file in whatever fashion you choose and thoroughly test the site.</p>
<h3>JS</h3>
<p>Combining JavaScript files can be a little trickier. You have to do a lot of testing for this part to make sure that you include everything and get it in the right order. Go through the same process of finding all the <code>&lt;script&gt;</code> elements in your page&#8217;s source and make note of them (in order). Once you have your list create a <code>scripts.combined.js</code> file and begin to copy/paste the code from the files on your list in.</p>
<p>Once you have all your scripts wrangled into one file start doing the same with the scripts from your list that you did with the styles in the previous step. The same process&#8217; should apply because the above article also covers the removal of scripts being placed by plugins.</p>
<p>Another step you can take with JavaScript files is to load them asynchronously instead of the direct method of inclusion used by the WordPress theme and plugin development best practices.</p>
<pre class="brush: javascript; gutter: true; first-line: 1; highlight: []; html-script: false">// ===============================
// Loading scripts anychronously
// http://jeremyhixon.com/sandbox/next/snippet/loading-javascript-files-asynchronously/
//
// Usage: getScript(&#039;script.js&#039;, function() { /* callback */ });
// ===============================
function getScript(url,success){
	var script = document.createElement(&#039;script&#039;);
	script.src = url;
	var head = document.getElementsByTagName(&#039;head&#039;)[0], done=false;
	script.onload = script.onreadystatechange = function(){
		if (!done &amp;&amp; (!this.readyState || this.readyState == &#039;loaded&#039; || this.readyState == &#039;complete&#039;)) {
			done=true;
			success();
			script.onload = script.onreadystatechange = null;
			head.removeChild(script);
		}
	};
	head.appendChild(script);
}
getScript(&#039;script_1.js&#039;, function() {
	getScript(&#039;script_2.js&#039;, function() {});
});</pre>
<p>This script will allow you to load your script(s) as the page renders instead of requiring they be loaded before the page can continue to load. The <code>getScript</code> function has a callback that enables you to load scripts in a certain order if the need arises. For instance, your scripts might be dependent upon jQuery being loaded to run. In this case you would use the first <code>getScript</code> to load jQuery and then, within that functions callback you&#8217;d use another <code>getScript</code> to call your scripts file.</p>
<h2>Minifying</h2>
<p>If you&#8217;ve gone through all the trouble above you should be thankful that this is what I&#8217;m ending on. Minifying is so simple and easy because there are a number of tools out there to do it for you. If you&#8217;ve compiled all your styles and scripts into a single file then you probably have 2 VERY large files now. Files that can be compressed to speed up their load time as well.</p>
<h3>Page Speed</h3>
<p><a href="https://developers.google.com/speed/pagespeed/" target="_blank">The Google Page Speed</a> plugins for both <a href="https://dl-ssl.google.com/page-speed/current/page-speed.xpi" title="Google Page Speed for Firefox" target="_blank">Firefox</a> and <a href="https://chrome.google.com/webstore/detail/gplegfbjlmmehdoakndmohflojccocli" title="Google Page Speed for Chrome" target="_blank">Chrome</a> will minify the code for you and give you links to the minified code in the results. It may take a little reading to find them, but they&#8217;re there. I recommend while you&#8217;re here that you check out Page Speed&#8217;s analysis of your pages load time. There are a number of useful suggestions in there for speeding your site up. My score usually hovers around 94-96. That&#8217;s mostly because I user responsive images and because of that I can&#8217;t specifically state the height and width of the images. I&#8217;m also using Picturefill as mentioned above which loads images with JavaScript so that throws PageSpeed off a little bit as well.</p>
<h3>YUI Compressor</h3>
<p>If you choose to do it yourself, I like <a href="http://refresh-sf.com/yui/" target="_blank">YUI Compressor</a> because it can compress your JS and CSS files on the same page, though not at the same time <img src='http://jeremyhixon.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . I&#8217;ve used this numerous times and have never gotten a bad result from it. You just copy/paste your code into the window, choose what it is your compressing, make whatever changes you want in the checkboxes (though I never do) and hit &#8220;Compress&#8221;. You&#8217;ll be taken to a window below with the compressed version of your code to be copy/pasted back into your original file. Cake.</p>
<p>No matter what method you use to minify your files I cannot stress enough that you test, test, test your site to make sure all the functionality is present after the modifications.</p>
<h2>Conclusion</h2>
<p>I hope you&#8217;ve enjoyed reading as much as I did toiling over the details to actually accomplish this on my website for the first time. It&#8217;s no small task but the rewards could be fantastic. If nothing else you&#8217;ll have a site that loads as quickly as possible and that should make your viewers happy. Which should make you happy. Cause that&#8217;s why were here. Sharing information.</p>
<p>If you have any insights or recommendations please share. I&#8217;m here to learn as well.</p>
</div><p>The post <a href="http://jeremyhixon.com/optimize-wordpress-loading-time/">Optimize WordPress Loading Time</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/VutoeoGKtfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/optimize-wordpress-loading-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/optimize-wordpress-loading-time/</feedburner:origLink></item>
		<item>
		<title>Remove all .svn folders, recursively</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/arsYgvOIeyQ/</link>
		<comments>http://jeremyhixon.com/remove-all-svn-folders-recursively/#comments</comments>
		<pubDate>Thu, 03 Jan 2013 13:30:29 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=1169</guid>
		<description><![CDATA[<p>Whenever I&#8217;ve left a website to a client for an extended period of time I feel the need to update the files in my repository to make sure it&#8217;s up to date. Before you replace the files in trunk with the files from the server it&#8217;s essential that you get rid of those pesky .svn [...]</p><p>The post <a href="http://jeremyhixon.com/remove-all-svn-folders-recursively/">Remove all .svn folders, recursively</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Whenever I&#8217;ve left a website to a client for an extended period of time I feel the need to update the files in my repository to make sure it&#8217;s up to date. Before you replace the files in trunk with the files from the server it&#8217;s essential that you get rid of those pesky .svn system folders that will have been pushed to the production server when the site was deployed.<span id="more-1169"></span></p>
<p>First things first, make sure you have your system files shown so that you can verify that the .svn folders have been removed.</p>
<p><strong>For Mac OS X</strong> (via terminal)</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder</pre>
<p><strong>For PC</strong> (thanks to <a title="How to see hidden files in Windows" href="http://www.bleepingcomputer.com/tutorials/how-to-see-hidden-files-in-windows/">Lawrence Abrams</a>):</p>
<ol>
<li>Close all programs so that you are at your desktop.</li>
<li>Click on the Start button. This is the small round button with the Windows flag in the lower left corner.</li>
<li>Click on the <strong>Control Panel</strong> menu option.</li>
<li>When the control panel opens click on the <strong>Appearance and Personalization</strong> link.</li>
<li>Under the Folder Options category, click on <strong>Show Hidden Files or Folders.</strong></li>
<li>Under the <strong>Hidden files and folders</strong> section select the radio button labeled <strong>Show hidden files, folders, or drives</strong>.</li>
<li>Remove the checkmark from the checkbox labeled <strong>Hide extensions for known file types</strong>.</li>
<li>Remove the checkmark from the checkbox labeled <strong>Hide protected operating system files (Recommended)</strong>.</li>
<li>Press the <strong>Apply </strong>button and then the <strong>OK</strong> button..</li>
<li>Now Windows 7 is configured to show all hidden files.</li>
</ol>
<p>Finally, navigate to the folder where the site files are stored and run this command:<br />
<strong>For Mac OS X</strong></p>
<pre class="brush: xml; gutter: false">rm -rf `find . -type d -name .svn`</pre>
<p><strong>For Windows</strong> (thanks to <a title="Recursively Delete .svn Directories With The Windows Command Line" href="http://blog.falafel.com/Blogs/adam-anderson/2011/04/02/Recursively_Delete_svn_Directories_With_The_Windows_Command_Line">Adam Anderson</a>):</p>
<pre class="brush: xml; gutter: false">for /r %R in (.svn) do if exist %R (rd /s /q &quot;%R&quot;)</pre>
</div><p>The post <a href="http://jeremyhixon.com/remove-all-svn-folders-recursively/">Remove all .svn folders, recursively</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/arsYgvOIeyQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/remove-all-svn-folders-recursively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/remove-all-svn-folders-recursively/</feedburner:origLink></item>
		<item>
		<title>Hosted Minecraft Server Update</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/LwX2clYcdVU/</link>
		<comments>http://jeremyhixon.com/minecraft-server-update/#comments</comments>
		<pubDate>Fri, 28 Dec 2012 14:30:26 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=1161</guid>
		<description><![CDATA[<p>This is a little outside my standard realm of topics but you never know who might need it. I run a Minecraft server and with the constant updates lately I&#8217;ve noted my process to make a little easier for me not to miss a step in the process. If it helps someone else out there, [...]</p><p>The post <a href="http://jeremyhixon.com/minecraft-server-update/">Hosted Minecraft Server Update</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>This is a little outside my standard realm of topics but you never know who might need it. I run a <a href="http://minecraft.net/">Minecraft</a> server and with the constant updates lately I&#8217;ve noted my process to make a little easier for me not to miss a step in the process. If it helps someone else out there, you&#8217;re welcome.<span id="more-1161"></span></p>
<h2>Screen</h2>
<p>I use the &#8220;<a href="http://www.oreillynet.com/linux/cmd/cmd.csp?path=s/screen">screen</a>&#8221; command to keep my server running. Whenever I need to update I need to kill the previous &#8220;screen&#8221; process first.</p>
<p>List server processes</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">ps aux</pre>
<p>From that list you&#8217;ll be able to see your &#8220;screen&#8221; process, get the PID# and kill it.</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">kill #Screen PID#</pre>
<h2>Minecraft Server File</h2>
<p>Delete the old &#8220;minecraft_server.jar&#8221; file since we won&#8217;t be needing it anymore.</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">rm minecraft_server.jar</pre>
<p>Download the updated &#8220;minecraft_server.jar&#8221; file from the server.</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar</pre>
<h2>A New Screen</h2>
<p>Open up a new &#8220;screen&#8221; instance.</p>
<pre class="brush: actionscript3; gutter: false; first-line: 1; highlight: []; html-script: false">screen</pre>
<p>Start the server back up within &#8220;screen&#8221;.</p>
<pre class="brush: xml; gutter: false; first-line: 1; highlight: []; html-script: false">java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui</pre>
<p>Leave the &#8220;screen&#8221; instance without exiting it by &#8220;detaching&#8221; it from the current terminal window.</p>
<p><code>Ctrl+a</code> then <code>Ctrl+d</code></p>
</div><p>The post <a href="http://jeremyhixon.com/minecraft-server-update/">Hosted Minecraft Server Update</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/LwX2clYcdVU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/minecraft-server-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/minecraft-server-update/</feedburner:origLink></item>
		<item>
		<title>Pagination and WP_Query</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/xxsofsJgxA4/</link>
		<comments>http://jeremyhixon.com/pagination-and-wp_query/#comments</comments>
		<pubDate>Fri, 02 Nov 2012 13:08:26 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[query_posts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_query]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=945</guid>
		<description><![CDATA[<p>If you&#8217;re into WordPress development, at some point, you&#8217;ll need to customize a query. I love WP_Query for this, it&#8217;s my default choice. During the development of this new theme, though, I ran into an issue. Turns out, pagination only works on the default query variable, $wp_query. For this site I have my work defined [...]</p><p>The post <a href="http://jeremyhixon.com/pagination-and-wp_query/">Pagination and WP_Query</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>If you&#8217;re into WordPress development, at some point, you&#8217;ll need to customize a query. I love WP_Query for this, it&#8217;s my default choice. During the development of this new theme, though, I ran into an issue. Turns out, pagination only works on the default query variable, <code>$wp_query</code>.<span id="more-945"></span></p>
<p>For this site I have my work defined as a custom post type. When it came time to arrange the page I went to my old friend WP_Query.</p>
<pre class="brush: php; gutter: true">$paged = (get_query_var(&#039;paged&amp;&#039;)) ? get_query_var(&#039;paged&#039;) : 1;
$work_args = array(
	&#039;post_type&#039; =&gt; &#039;works&#039;,
	&#039;posts_per_page&#039; =&gt; 3,
	&#039;paged&#039; =&gt; $paged
);
$work = new WP_Query($work_args);
if ($work-&gt;have_posts()) {
	while ($work-&gt;have_posts()) {
		$work-&gt;the_post();

		// loop code
	}
}
wp_reset_postdata();</pre>
<p>This works for the most part, you can even see the second page if you use the url <code>/work/page/2</code>. But pagination just doesn&#8217;t work. I use <a title="Plugin for WordPress Pagination" href="http://wordpress.org/extend/plugins/wp-paginate/">WP_Paginate </a>on this site, but not even the default <code>previous_posts_link()</code> or <code>next_posts_link()</code> work.</p>
<p>When numerous attempts and little code changes didn&#8217;t help I attempted to try and change my query method up a little bit. Instead of using WP_Query to create a new query I user query_posts to simply modify the existing query (<code>$wp_query</code>) instead.</p>
<pre class="brush: php; gutter: true; first-line: 1; highlight: []; html-script: false">$paged = (get_query_var(&#039;paged&#039;)) ? get_query_var(&#039;paged&#039;) : 1;
$work_args = array(
	&#039;post_type&#039; =&gt; &#039;works&#039;,
	&#039;posts_per_page&#039; =&gt; 3,
	&#039;paged&#039; =&gt; $paged
);
query_posts($work_args);
if (have_posts()) {
	while (have_posts()) {
		the_post();

		// loop code
	}
}
wp_reset_query();</pre>
<p>Essentially, everything is the same as far as the query itself is concerned. I simply changed the method and used the query_posts function and removed all the references to the original, and now non-existant, <code>$work</code> query. After doing so, pagination functions started working. That&#8217;s because these functions are looking for the <code>$wp_query</code> variable and not a custom one you define yourself. Query_posts just modifies <code>$wp_query</code> to display what you want instead of creating a whole new query variable.</p>
</div><p>The post <a href="http://jeremyhixon.com/pagination-and-wp_query/">Pagination and WP_Query</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/xxsofsJgxA4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/pagination-and-wp_query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/pagination-and-wp_query/</feedburner:origLink></item>
		<item>
		<title>WP Admin Menu</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/WUoPp0TmuCw/</link>
		<comments>http://jeremyhixon.com/wp-admin-menu/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 13:19:59 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=1188</guid>
		<description><![CDATA[<p>With the advent of the admin menu bar in 3.1 I&#8217;ve began using and modifying that instead of maintaining this plugin any longer. Thank you for all your support during it&#8217;s run. If you&#8217;re looking for a method to add your own, custom, links to WordPress default admin bar, as I do, I have a [...]</p><p>The post <a href="http://jeremyhixon.com/wp-admin-menu/">WP Admin Menu</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>With the advent of the admin menu bar in 3.1 I&#8217;ve began using and modifying that instead of maintaining this plugin any longer.</p>
<p>Thank you for all your support during it&#8217;s run.</p>
<p>If you&#8217;re looking for a method to add your own, custom, links to WordPress default admin bar, as I do, <a title="Theme Development Links for the WordPress Admin Bar" href="http://jeremyhixon.com/snippet/theme-development-links-for-the-wordpress-admin-bar/">I have a snippet for that</a>.</p>
</div><p>The post <a href="http://jeremyhixon.com/wp-admin-menu/">WP Admin Menu</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/WUoPp0TmuCw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/wp-admin-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/wp-admin-menu/</feedburner:origLink></item>
		<item>
		<title>Add flare to your WordPress themes with shortcodes</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/p_GAQffak54/</link>
		<comments>http://jeremyhixon.com/add-flare-wordpress-themes-shortcodes/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 11:40:16 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=899</guid>
		<description><![CDATA[<p>Shortcodes can be used in WordPress themes to create a custom style, and improve user experience for users</p><p>The post <a href="http://jeremyhixon.com/add-flare-wordpress-themes-shortcodes/">Add flare to your WordPress themes with shortcodes</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>When you&#8217;re creating a theme, for yourself or someone else, ease of use should be one of the foremost things in mind when it comes to the interaction between the back end and the front end. Any time you can take a convoluted process and simplify it into language that anyone can understand, without prior knowledge of the various languages we develop with, then that&#8217;s a step you should take. WordPress makes this easier with <a title="Shortcode API « WordPress Codex" href="http://codex.wordpress.org/Shortcode_API">shortcodes</a>.<span id="more-899"></span></p>
<h2>The basics of shortcodes</h2>
<p>The shortcodes that accompany your theme will be set up in your <code>functions.php</code> file. What we will be creating are basically filters that we will pass simple parameters through and get more complex HTML output on the front end. Effectively this will give the end-user the ability to create their own custom, styled elements without needing to know HTML and/or CSS.</p>
<h2>Potential</h2>
<p>Here are the ideas I&#8217;ll be covering in this post:</p>
<ul>
<li>Link tags with urls and titles for SEO</li>
<li>Links styled like buttons</li>
<li>Lists with symbols instead of your standard discs or circles</li>
</ul>
<p>If a few of my choices for shortcode names make you chuckle it&#8217;s because I had to be careful in choosing names. I use a few shortcodes on this theme and during the process of writing this post I was encountering some conflicts <img src='http://jeremyhixon.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  There are tons of implications with shortcodes. I also use them on my site to lay out my content with elements of a <a title="960 Grid System" href="http://960.gs/">960 grid</a>. Use your imagination and if you come up with any really good ones, please, <a href="#comment">share</a>!</p>
<h2>> Link shortcode with URL and Title</h2>
<p>We all know that links need URLs, but title tags come into play when we take SEO and/or accessibility into consideration. If the text you&#8217;re linking is descriptive then there&#8217;s really no need for a title but in some cases you want to link a keyword to a page, in which case; you should use a title. This shortcode can be used to simply link text or you can add the <code>title</code> attribute when you need it.</p>
<p>The whole of this modification takes place in the <code>functions.php</code> file.</p>
<pre class="brush: php; gutter: true; first-line: 1; highlight: []; html-script: false">function custom_link($atts, $content = null) {
   extract(shortcode_atts(array(
      &#039;url&#039; 	=&gt; &#039;http://&#039;,
	  &#039;title&#039;	=&gt; &#039;&#039;
   ),$atts));
   return &#039;&lt;a href=&quot;&#039;.esc_attr($url).&#039;&quot; title=&quot;&#039;.$title.&#039;&quot;&gt;&#039;.do_shortcode($content).&#039;&lt;/a&gt;&#039;;
}
add_shortcode(&#039;custom-link&#039;, &#039;custom_link&#039;);</pre>
<p>In the above content we create our function <code>text_link</code> and create the places for passing the parameters <code>$atts</code> (an array of attributes) and <code>$content</code> (the content between the opening and closing shortcodes). Inside the function we start by extracting the attributes from the <code>$atts</code> array. We then return the link with the url, title and content in the appropriate place. When this is all said and done you can use something that looks like this:</p>
<pre class="brush: html; gutter: true; first-line: 1; highlight: []; html-script: false">[custom-link url=&quot;http://google.com&quot; title=&quot;Google&quot;]Google[/custom-link]</pre>
<p>…and get something that looks like this; <a title="Google" href="http://google.com">Google</a>. You can hover over the link to see the title.</p>
<h2>> Links styled to look like buttons</h2>
<p>This one is going to be very similar to the previous one. Only difference is that we&#8217;ll be using some CSS to style the result of our shortcode to look like a button. We start with our function:</p>
<pre class="brush: php; gutter: true; first-line: 1; highlight: []; html-script: false">function but_link($atts, $content = null) {
   extract(shortcode_atts(array(
      &#039;url&#039; 	=&gt; &#039;http://&#039;,
	  &#039;title&#039;	=&gt; &#039;&#039;
   ),$atts));
   return &#039;&lt;a class=&quot;button-link&quot; href=&quot;&#039;.esc_attr($url).&#039;&quot; title=&quot;&#039;.$title.&#039;&quot;&gt;&#039;.do_shortcode($content).&#039;&lt;/a&gt;&#039;;
}
add_shortcode(&#039;but-link&#039;, &#039;but_link&#039;);</pre>
<p>The code above is fundamentally the same as the previous shortcode, only I added a class to our output of &#8220;button-link&#8221;. Now lets put together some CSS to give us a basic button look/feel. I&#8217;ll toss in some CSS3 for the <strong>good</strong> browsers. <img src='http://jeremyhixon.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush: css; gutter: true; first-line: 1; highlight: []; html-script: false">.button-link:link, .button-link:visited {float:left; display:block;
	height:25px; padding:0 35px;
	font:bold 12px/25px Verdana, Geneva, sans-serif; text-decoration:none; color:#777;
	border:1px solid #ddd;
	background:#ccc;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(204,204,204)),color-stop(1, rgb(238,238,238)));
	background:-moz-linear-gradient(center bottom,rgb(204,204,204) 0%,rgb(238,238,238) 100%);
	text-shadow:0 1px 1px #fff;}
.button-link:hover {color:#333;
	background:#ccc;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(204,204,204)),color-stop(1, rgb(238,238,238)));
	background:-moz-linear-gradient(center bottom,rgb(204,204,204) 0%,rgb(238,238,238) 100%);
	text-shadow:0 0 3px #fff;}
.button-link:active {color:#333;
	background:#fff;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(238,238,238)),color-stop(1, rgb(204,204,204)));
	background:-moz-linear-gradient(center bottom,rgb(238,238,238) 0%,rgb(204,204,204) 100%);
	text-shadow:0 -1px 1px #fff;}</pre>
<p>With the code above you can turn a code like this:</p>
<pre class="brush: html; gutter: true; first-line: 1; highlight: []; html-script: false">[but-link url=&quot;http://google.com&quot; title=&quot;Google&quot;]Google[/button-link]</pre>
<p>Into a nifty styled link like this:</p>
<style>.button-link:link, .button-link:visited {float:left; display:block;
	height:25px; padding:0 35px;
	font:bold 12px/25px Verdana, Geneva, sans-serif; text-decoration:none; color:#777;
	border:1px solid #ddd;
	background:#ccc;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(204,204,204)),color-stop(1, rgb(238,238,238)));
	background:-moz-linear-gradient(center bottom,rgb(204,204,204) 0%,rgb(238,238,238) 100%);
	text-shadow:0 1px 1px #fff;}
.button-link:hover {color:#333;
	background:#ccc;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(204,204,204)),color-stop(1, rgb(238,238,238)));
	background:-moz-linear-gradient(center bottom,rgb(204,204,204) 0%,rgb(238,238,238) 100%);
	text-shadow:0 0 3px #fff;}
.button-link:active {color:#333;
	background:#fff;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(238,238,238)),color-stop(1, rgb(204,204,204)));
	background:-moz-linear-gradient(center bottom,rgb(238,238,238) 0%,rgb(204,204,204) 100%);
	text-shadow:0 -1px 1px #fff;}</style>
<p><a class="button-link" title="Google" href="http://google.com">Google</a><br />
<br style="clear:both"></p>
<h2>&gt; Custom styled lists</h2>
<p>You&#8217;re standard, unordered list is a pretty boring piece of content. Granted it&#8217;s not as bad as a spreadsheet, but there&#8217;s really nothing too graphically pleasing about them. There are times when you need the plain, old lists and then there are times when we can implement a better looking, styled list to draw our readers eye. Below we&#8217;ll create a shortcode to wrap around our unordered lists in the event that we want to spice them up a little.</p>
<p>Here&#8217;s an unordered list, a feature list of my favorite <a title="Firefox Browser | Free ways to customize your Internet" href="http://www.mozilla.com/en-US/firefox/personal.html">browser</a>, that could stand to be more appealing.</p>
<ul>
<li>Password manager</li>
<li>Awesome bar</li>
<li>Session restore</li>
<li>Personas</li>
<li>Supports quite a bit of CSS3 and HTML5</li>
</ul>
<p>All we really need to do to begin styling this is to create a shortcode to wrap our unordered list in an easily identifiable element that we can call on in our CSS. In this case I&#8217;ll create a shortcode to go around the list that places the list inside a div with a class of <code>list-check</code>.</p>
<pre class="brush: php; gutter: true; first-line: 1; highlight: []; html-script: false">function list_check($atts, $content = null) {
	return &#039;&lt;div class=&quot;list-check&quot;&gt;&#039;.do_shortcode($content).&#039;&lt;/div&gt;&#039;;
}
add_shortcode(&#039;list-check&#039;, &#039;list_check&#039;);</pre>
<p>Now we come up with our CSS to make this list more appealing and we target it based on the class of the div we&#8217;re wrapping around our list.</p>
<pre class="brush: css; gutter: true; first-line: 1; highlight: []; html-script: false">.list-check {background:#eee;
	padding:25px;
	float:left;
	font:bold 14px/1em &quot;Lucida Sans Unicode&quot;, &quot;Lucida Grande&quot;, sans-serif;
	border:1px solid #63BD38;
	-moz-border-radius:10px; -webkit-border-radius:10px; -o-border-radius:10px; border-radius:10px;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(179,179,179)),color-stop(1, rgb(230,230,230)));
	background:-moz-linear-gradient(center bottom,rgb(179,179,179) 0%,rgb(230,230,230) 100%);}
.list-check * {margin:0; padding:0; list-style:none;}
.list-check li {height:25px; line-height:25px;
	padding-left:35px; margin-bottom:5px;
	color:#666; text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);
	background:transparent url(http://jeremyhixon.com/wp-content/uploads</pre>
<p>/2010/11/1289486991_check.png) no-repeat scroll 0 0;}<br />
.list-check li:hover {color:#333;}<br />
This will style the div around the list and style the list items themselves. I'm not a designer so I'm sure it could be better. I'll leave that up to you <img src='http://jeremyhixon.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Now when we use add our list wrapped in our shortcode like so:</p>
<pre class="brush: html; gutter: true; first-line: 1; highlight: []; html-script: false">[list-check]
 &lt;ul&gt;
	&lt;li&gt;Password manager&lt;/li&gt;
	&lt;li&gt;Awesome bar&lt;/li&gt;
	&lt;li&gt;Session restore&lt;/li&gt;
	&lt;li&gt;Personas&lt;/li&gt;
	&lt;li&gt;Supports quite a bit of CSS3 and HTML5&lt;/li&gt;
&lt;/ul&gt;
[/list-check]</pre>
<p>…we get a nicely styled, or at least "far from plain", version of our feature list:</p>
<style>.list-check {background:#eee;
	padding:25px;
	float:left;
	font:bold 14px/1em "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	border:1px solid #63BD38;
	-moz-border-radius:10px; -webkit-border-radius:10px; -o-border-radius:10px; border-radius:10px;
	background:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(179,179,179)),color-stop(1, rgb(230,230,230)));
	background:-moz-linear-gradient(center bottom,rgb(179,179,179) 0%,rgb(230,230,230) 100%);}
.list-check * {margin:0; padding:0; list-style:none;}
.list-check li {height:25px; line-height:25px;
	padding-left:35px; margin-bottom:5px;
	color:#666; text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);
	background:transparent url(http://jeremyhixon.com/wp-content/uploads/2013/03/1362685761_button_ok.png) no-repeat scroll 0 0;}
.list-check li:hover {color:#333;}</style>
<div class="list-check">
<ul>
<li>Password manager</li>
<li>Awesome bar</li>
<li>Session restore</li>
<li>Personas</li>
<li>Supports quite a bit of CSS3 and HTML5</li>
</ul>
</div>
<p><br style="clear:both"><br />
&nbsp;</p>
<h2>Conclusion</h2>
<p>As I said before, there are lots of potential uses for shortcodes. Leave a comment below if you have any questions or want to show off your uses for them.</p>
</div><p>The post <a href="http://jeremyhixon.com/add-flare-wordpress-themes-shortcodes/">Add flare to your WordPress themes with shortcodes</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/p_GAQffak54" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/add-flare-wordpress-themes-shortcodes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/add-flare-wordpress-themes-shortcodes/</feedburner:origLink></item>
		<item>
		<title>Custom Styles in TinyMCE for WordPress</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/CkD0RriCjyw/</link>
		<comments>http://jeremyhixon.com/custom-styles-tinymce-wordpress/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 13:41:59 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[tinymce]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jeremyhixon.com/?p=866</guid>
		<description><![CDATA[<p>Changing the default appearance of the editor in WordPress to match your theme style is easy and gives you a more accurate representation of your layout as you work.</p><p>The post <a href="http://jeremyhixon.com/custom-styles-tinymce-wordpress/">Custom Styles in TinyMCE for WordPress</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>The default style of TinyMCE included with WordPress is simple and effective. Often, though, it doesn&#8217;t give us an accurate representation of the layout and style we&#8217;re going to be seeing when the content is published. To remedy this we can add style to TinyMCE through our template&#8217;s <code>functions.php</code> file.<span id="more-866"></span><br />
<h2>Considerations</h2>
<p>Bear in mind that you might not want to simply include your site&#8217;s overall style into TinyMCE. It&#8217;s probably the easiest way to do this  and it&#8217;s what I plan to do, but it may take some tweaking to get it just right since we&#8217;re going to be viewing something intended for a full page in a very small window. I&#8217;ll describe a way to include your site style and leave yourself room to fix layout and font issues you may encounter along the way.</p>
<h2>Implementing the Style</h2>
<p>What we&#8217;ll be doing is attaching a stylesheet to our TinyMCE editor using our <code>functions.php</code> file.</p>
<ol>
<li>Open the <code>functions.php</code> located in your template&#8217;s root folder</li>
<li>Add the following code, at the top of the file (after the opening <code>&lt;?php</code> tag)<br />
<code>add_editor_style();</code></li>
<li>Save the file. This will attach a css file named <code>editor-style.css</code> that will be placed in your theme&#8217;s root directory (the same directory as the <code>functions.php</code> file you&#8217;re editing. The default action of this function is to attach this file. You can attach a file with a different filename or location using this function like the exanples below.<br />
<code>add_editor_style('css/custom-style.css');</code></li>
<li>Now we create our <code>editor-style.css</code> file and add the following code right at the top<br />
[code type="css"]@import url('style.css');[/code]</li>
<li>Save the file. This will add our full site stylesheet to the editor and, thus,  pull in all our default styles.</li>
</ol>
<h2>Troubleshooting</h2>
<p>If you see problems with the way your editor looks with all of your styles applied you can tweak it in the <code>editor-style.css</code> file below the @import. There are things you may want to look for.</p>
<ul>
<li>Contrast (or a lack thereof) of text on the background color</li>
<li>Font sizes (header tags)</li>
<li>Margins (header tags, paragraphs and lists)</li>
</ul>
</div><p>The post <a href="http://jeremyhixon.com/custom-styles-tinymce-wordpress/">Custom Styles in TinyMCE for WordPress</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/CkD0RriCjyw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/custom-styles-tinymce-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/custom-styles-tinymce-wordpress/</feedburner:origLink></item>
		<item>
		<title>Drupal and PHP 5.3</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/W5z_9NPMCkc/</link>
		<comments>http://jeremyhixon.com/drupal-and-php/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 11:50:19 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://rationalogic.com/?p=617</guid>
		<description><![CDATA[<p>Drupal and PHP 5.3 Don't play nicely with one another out-of-the-box</p><p>The post <a href="http://jeremyhixon.com/drupal-and-php/">Drupal and PHP 5.3</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Drupal states on it&#8217;s site that <a title="System requirements | drupal.org" href="http://drupal.org/requirements" target="_blank&quot;">it doesn&#8217;t support PHP 5.3</a>. And, if you attempt to install drupal on a server running PHP 5.3 you get a lovely series of errors along the lines of &#8220;Function ereg() is deprecated in&#8230;&#8221; and so on. This was a bit troublesome consider my development environment is <a title="apache friends - xampp" href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> and it happens to be using version 5.3. Luckily, there&#8217;s a way to &#8220;hack&#8221; the drupal version 6.x to get it to work.<span id="more-617"></span></p>
<p>You could, of course, go back to PHP 5.2 if you want, but that&#8217;s just not like me. In the event that you don&#8217;t want to go that route you can edit one of the drupal includes to ignore the error and get on with things. Here&#8217;s how it&#8217;s done:</p>
<ol>
<li>Open the file &#8216;includesfile.inc&#8217; in your drupal root folder.</li>
<li>Scroll to line #902</li>
<li>Locate the following line:<br />
<code>elseif ($depth &gt;= $min_depth &amp;&amp; ereg($mask, $file)) {</code></li>
<li>Replace that bit of code with this one:<br />
<code>elseif ($depth &gt;= $min_depth &amp;&amp; mb_ereg($mask, $file)) {</code></li>
<li>Save the file and try the install again.</li>
</ol>
<p>That should get you all squared away to use drupal. I typically don&#8217;t like editing application files when I install new software, but there&#8217;s no way I&#8217;m working backward on server software just for the sake of this one little change.</p>
</div><p>The post <a href="http://jeremyhixon.com/drupal-and-php/">Drupal and PHP 5.3</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/W5z_9NPMCkc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/drupal-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/drupal-and-php/</feedburner:origLink></item>
		<item>
		<title>WordPress as a CMS</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/qbtzx0sNp2Q/</link>
		<comments>http://jeremyhixon.com/wordpress-as-a-cms/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:54:25 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rationalogic.com/?p=533</guid>
		<description><![CDATA[<p>I was reading this article on net tuts and it makes a good point, in a way. There are a lot of CMS software packages out there. I&#8217;ve used a few of them. Joomla, Magento, Mambo, Silverstripe and maybe some more that I don&#8217;t even recall. I&#8217;d say Joomla, Mambo and Magento are way to [...]</p><p>The post <a href="http://jeremyhixon.com/wordpress-as-a-cms/">WordPress as a CMS</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>I was reading <a title="Wordpress as a CMS" href="http://net.tutsplus.com/tutorials/plus-tutorials-2/wordpress-as-a-cms-new-plus-tutorial/" target="_blank">this article</a> on <a title="Net Tuts" href="http://net.tutsplus.com/" target="_blank">net tuts</a> and it makes a good point, in a way. There are a lot of CMS software packages out there. I&#8217;ve used a few of them. <a title="Joomla! - the dynamic portal engine and content management system." href="http://www.joomla.org/" target="_blank">Joomla</a>, <a title="Magento is the eCommerce software platform for growth that promises to revolutionize the industry." href="http://www.magentocommerce.com/" target="_blank">Magento</a>, <a title="Mambo - the dynamic portal engine and content management system." href="http://www.mamboserver.com/" target="_blank">Mambo</a>, <a title="The SilverStripe open source software for building and editing websites." href="http://www.silverstripe.org/" target="_blank">Silverstripe</a> and maybe some more that I don&#8217;t even recall.<span id="more-533"></span></p>
<p>I&#8217;d say Joomla, Mambo and Magento are way to complicated for the average person just looking for a site they can frequently update with either new pages or new posts. Silverstripe is pretty simple but the install is a little weird and I really don&#8217;t like the template system, reminds me of Magento actually. Which I, also, did not care for. <a title="A semantic personal publishing platform with a focus on aesthetics, web standards, and usability." href="http://wordpress.org/" target="_blank">WordPress</a> is blog software, yes, but it has static pages, lots of plugins and an easy to use template system. You can set up a nice stylesheet for the users to take advantage of, some stylized head tags, a couple of font families and some colors and hopefully the users won&#8217;t start adding in their own styles in the HTML of their posts <img src='http://jeremyhixon.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Here are a few links that might help convince you if I couldn&#8217;t do it in a paragraph or two</strong></p>
<p>This is the showcase on wordpress.org, it gives you a good idea of the number of sites using wordpress. It will also give you a bit of inspiration into the varieties of designs that can be implemented.</p>
<ul>
<li><a title="Wordpress Showcase" href="http://wordpress.org/showcase/" target="_blank">http://wordpress.org/showcase/</a></li>
</ul>
<p>This is where the folks at wordpress house all the &#8220;approved&#8221; <a title="Wordpress Plugin Database" href="http://wordpress.org/extend/plugins/" target="_blank">plugins</a>. And here are a few of the highlights:</p>
<ul>
<li><a title="Google XML Sitemaps" href="http://wordpress.org/extend/plugins/google-sitemap-generator/" target="_blank">Google XML Sitemaps</a></li>
<li><a title="All in One SEO Pack" href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" target="_blank">All in One SEO Pack</a></li>
<li><a title="Contact Form 7" href="http://wordpress.org/extend/plugins/contact-form-7/" target="_blank">Contact Form 7</a></li>
<li><a title="WP FollowMe" href="http://wordpress.org/extend/plugins/wp-followme/" target="_blank">WP FollowMe</a></li>
<li><a title="Sociable" href="http://wordpress.org/extend/plugins/sociable/" target="_blank">Sociable</a></li>
</ul>
<p>Here&#8217;s some inspiration:</p>
<ul>
<li><a title="We Love WP - The Best WordPress Gallery" href="http://welovewp.com/" target="_blank">We Love WP</a></li>
<li><a title="WPInspiration - Showcasing the Best WordPress Sites on the Internet" href="http://wpinspiration.com/" target="_blank">WPInspiration</a></li>
<li><a title="Smashing Magazine - 45 Excellent Blog Designs" href="http://www.smashingmagazine.com/2007/08/28/45-excellent-blog-designs/" target="_blank">Smashing Magazine &#8211; 45 Excellent Blog Designs</a></li>
<li><a title="CSS Bloom - WordPress" href="http://www.cssbloom.net/categories/wordpress/" target="_blank">CSS Bloom &#8211; WordPress</a></li>
</ul>
<p>Enjoy the reading and let me know what you think. Oh, this site is just another wordpress blog too.</p>
</div><p>The post <a href="http://jeremyhixon.com/wordpress-as-a-cms/">WordPress as a CMS</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/qbtzx0sNp2Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/wordpress-as-a-cms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/wordpress-as-a-cms/</feedburner:origLink></item>
		<item>
		<title>SEO Friendly Flex and AS3 Sites</title>
		<link>http://feedproxy.google.com/~r/JeremyHixon/~3/Qf1V-mhmS3I/</link>
		<comments>http://jeremyhixon.com/seo-friendly-flex-as3-sites/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 09:50:29 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://rationalogic.com/?p=491</guid>
		<description><![CDATA[<p>An article written before Google was doing a good job of indexing Flash sites. An interesting topic though</p><p>The post <a href="http://jeremyhixon.com/seo-friendly-flex-as3-sites/">SEO Friendly Flex and AS3 Sites</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p>]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>I know that Google, for instance, &#8220;can&#8221; index sites developed in Flash with Flex and AS3. I did read, however, that it really only get&#8217;s the text from the elements in the flash. Which is effective to an extent and certainly better than nothing at all. I don&#8217;t think this is really the best way for your flash sites to be indexed.<br />
<span id="more-491"></span><br />
Recently I worked on a flash website, developed in Flex, that was intended to be XML driven to some extent. This was an attempt to make the page a tad easier to change, but it left an opening for something much better in my opinion. We decided that instead of using an XML file to drive the site, we would create a basic index.php file with H1s, H2, paragraphs and the like, and use that as our data source for the flash file. Essentially the same as an XML file in the way that it&#8217;s parsed, only, we can do some checking on the server side and a little javascript to funnel users and search engines to the content we want them to see.</p>
<p>Senario 1:<br />
The average person comes across the page. If the browser has javascript enabled, they&#8217;re checked for the correct version of flash. If they need to update, they are prompted to do so. If they are up to date, they are forwarded on to the flash site. The flash requests the data from the index file with XML headers and the flash is populated.</p>
<p>Scenario 2:<br />
A robot happens upon the page. PHP passes it HTML headers and the page is indexed with more SEO friendly elements, only it&#8217;s the exact same content.</p>
<p>I can&#8217;t fathom a third scenario, but I&#8217;m open to suggestion.</p>
</div><p>The post <a href="http://jeremyhixon.com/seo-friendly-flex-as3-sites/">SEO Friendly Flex and AS3 Sites</a> appeared first on <a href="http://jeremyhixon.com">Jeremy Hixon</a>.</p><img src="http://feeds.feedburner.com/~r/JeremyHixon/~4/Qf1V-mhmS3I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://jeremyhixon.com/seo-friendly-flex-as3-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jeremyhixon.com/seo-friendly-flex-as3-sites/</feedburner:origLink></item>
	</channel>
</rss>
