<?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>BenjaminBradley.com</title>
	<atom:link href="http://www.benjaminbradley.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benjaminbradley.com</link>
	<description>Providing Tech Solutions to Simplify Your Development Life</description>
	<lastBuildDate>Tue, 15 May 2012 15:32:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Clients are Scared of the Childish Blog?</title>
		<link>http://www.benjaminbradley.com/clients-are-scared-of-the-childish-blog/</link>
		<comments>http://www.benjaminbradley.com/clients-are-scared-of-the-childish-blog/#comments</comments>
		<pubDate>Tue, 15 May 2012 14:51:10 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[labels]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=745</guid>
		<description><![CDATA[They are out there. Clients who believe blogs are childish things similar to a corporate presence being established on MySpace. You, the developer, want to build them an incredible website powered by WordPress. But when they see the backend and these things called posts, they refuse to pay because you built them a childish website [...]]]></description>
			<content:encoded><![CDATA[<p>They are out there. Clients who believe <em>blogs</em> are childish things similar to a corporate presence being established on MySpace. You, the developer, want to build them an incredible website powered by WordPress.  But when they see the backend and these things called <em>posts</em>, they refuse to pay because you built them a childish website not fit for the corporate world.  (Trust me, I know of someone this happened to.)  Well, this can all be fixed by created a little filter to your active theme's <em>functions.php</em> file.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> turn_post_into_article<span style="color: #009900;">&#40;</span><span style="color: #000088;">$translated</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$translated</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_ireplace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Article'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$translated</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$translated</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gettext'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'turn_post_into_article'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ngettext'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'turn_post_into_article'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>This simple code will rename (or translate) the word <em>Post</em> into <em>Article</em> throughout your website. Now you don't have to worry about your clients getting worried that you built them a <em>childish site with posts</em>.  <img src='http://www.benjaminbradley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/clients-are-scared-of-the-childish-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Serve your WordPress Site 10x Faster</title>
		<link>http://www.benjaminbradley.com/serve-your-wordpress-site-10x-faster/</link>
		<comments>http://www.benjaminbradley.com/serve-your-wordpress-site-10x-faster/#comments</comments>
		<pubDate>Mon, 14 May 2012 13:01:14 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=737</guid>
		<description><![CDATA[See updated note at bottom of post. You might be thinking to yourself, this guy is trying to sell some type of miracle snake-oil potion. How could it be so easy to speed up your WordPress site? The truth of the matter is that most of the time we don't take advantage of many of [...]]]></description>
			<content:encoded><![CDATA[<p><em>See updated note at bottom of post.</em></p>
<p>You might be thinking to yourself, this guy is trying to sell some type of miracle snake-oil potion.  How could it be so easy to speed up your WordPress site?  The truth of the matter is that most of the time we don't take advantage of many of the resources available to us.  Most WordPress users are delivering uncompressed content to visitors of their sites.  But did you know you can serve most of this content in a compressed fashion?  It really is as easy as adding the following lines of code to the end of your <em>.htaccess</em> file.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">AddOutputFilterByType DEFLATE text<span style="color: #339933;">/</span>plain
AddOutputFilterByType DEFLATE text<span style="color: #339933;">/</span>html
AddOutputFilterByType DEFLATE text<span style="color: #339933;">/</span>xml
AddOutputFilterByType DEFLATE text<span style="color: #339933;">/</span>css
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>xml
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>xhtml<span style="color: #339933;">+</span>xml
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>rss<span style="color: #339933;">+</span>xml
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>javascript
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>x<span style="color: #339933;">-</span>javascript
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>x<span style="color: #339933;">-</span>httpd<span style="color: #339933;">-</span>php
AddOutputFilterByType DEFLATE application<span style="color: #339933;">/</span>x<span style="color: #339933;">-</span>httpd<span style="color: #339933;">-</span>fastphp
AddOutputFilterByType DEFLATE image<span style="color: #339933;">/</span>svg<span style="color: #339933;">+</span>xml</pre></div></div>




<p>Now your site will serve compressed versions of your content and should speed up your site (as much as 10x faster). Let me know if you notice a visible difference in the render time of your site.  On many of my sites, the difference is clearly visible.</p>

<p><b>Update:</b> A good reminder from some readers that I forgot to wrap these statements with a conditional tag to make sure the .htaccess file doesn't fail if a specific module isn't installed on your specific server.  So, in order to do this you would wrap the above code with conditional tags like:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>IfModule mod_deflate<span style="color: #339933;">.</span>c<span style="color: #339933;">&gt;</span>
THE CODE ABOVE GOES IN HERE
<span style="color: #339933;">&lt;/</span>IfModule<span style="color: #339933;">&gt;</span></pre></div></div>




<p>My apologies for not doing this in the first place.</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/serve-your-wordpress-site-10x-faster/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Design is more than just Code</title>
		<link>http://www.benjaminbradley.com/web-design-is-more-than-just-code/</link>
		<comments>http://www.benjaminbradley.com/web-design-is-more-than-just-code/#comments</comments>
		<pubDate>Wed, 09 May 2012 15:34:39 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[grammar]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=713</guid>
		<description><![CDATA[A person might be a brilliant coder and able to churn out amazing amounts of development work, yet it seems that there is a major stumbling block that trips up even the best developers. I'm talking about English. I'm not talking about your skills with a billiards cue or how to write a five-paragraph essay. [...]]]></description>
			<content:encoded><![CDATA[<p>A person might be a brilliant coder and able to churn out amazing amounts of development work, yet it seems that there is a major stumbling block that trips up even the best developers.  I'm talking about English.  I'm not talking about your skills with a billiards cue or how to write a five-paragraph essay. Nothing is worse than getting ready to close on a development deal and a little thing called grammar comes and bites your project in the butt.</p>

<p>So, I'm here to help with this post.  Here are some questions you should be asking yourself.  If you don't know the answer to some of these questions, you might want to check out <a href="http://www.grammarly.com/">Grammarly</a> to get the necessary help to leap over the vicious grammar stumbling block.  The following questions should help you diagnose a problem and the examples are ACTUAL examples pulled from people's websites.</p>
<span id="more-713"></span>
<ul>
<li class="question">Do you know the difference between <em>there</em>, <em>their</em>, and <em>they're</em>?<br />
<span class="example">The ball is over <b>their</b>.<br /><b>They're</b> is a good chance your SEO doesn't work.<br />Clients can login on <b>there</b> member page.</span></li>
<li class="question">Do you know the difference between <em>its</em> and <em>it's</em>?<br />
<span class="example"><b>Its</b> been good to know you.<br />WordPress is known for <b>it's</b> expandability.</span></li>
<li class="question">Do you know when to use <em>peek</em>, <em>peak</em>, and <em>pique</em>?</li>
<li class="question">Do you understand the difference between <em>effect</em> and <em>affect</em>?</li>
<li class="question">Are you an apostrophe lover?</li>
<li class="question">Do you know when to use a hyphen to form a two-word adjective?</li>
<li class="question">Do you know the difference between <em>loose</em> and <em>lose</em>?<br />
<span class="example">I hate to <b>loose</b> women!<br />I hate to <b>lose</b> women!</li>
<li class="question">Do you know when to use <em>roll</em> and when to use <em>role</em>?<br />
<span class="example">I was on a <b>role</b> during that last coding session.<br />Your website plays a pivotal <b>roll</b> in your business.</span></li>
<li class="question">Did you know that <em>should of</em> does NOT mean <em>should have</em>?<br />
<span class="example">I should of done the code differently</span></li>
<li class="question">Do you know the difference between <em>your</em> and <em>you're</em>?<br />
<span class="example"><b>Your</b> going to be sorry for missing out on this opportunity.<br />Before you do anything, you should check <b>you're</b> analytics.</span></li></ul>

<p>Do you have your own <em>grammar issues</em> you cannot stand?</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/web-design-is-more-than-just-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Newbie&#8217;s Guide to Web Hosting</title>
		<link>http://www.benjaminbradley.com/newbies-guide-to-web-hosting/</link>
		<comments>http://www.benjaminbradley.com/newbies-guide-to-web-hosting/#comments</comments>
		<pubDate>Wed, 02 May 2012 14:35:07 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[WebDev]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=696</guid>
		<description><![CDATA[I'm often asked by people who are considering starting their own blog or website about the differences in the different hosting solutions provided by the millions of hosting companies. They want to know what is a good deal, what is "too much server" for them, what are the disadvantages of one type of hosting over [...]]]></description>
			<content:encoded><![CDATA[<p>I'm often asked by people who are considering starting their own blog or website about the differences in the different <em>hosting solutions</em> provided by the <b>millions</b> of hosting companies. They want to know what is a good deal, what is "too much server" for them, what are the disadvantages of one type of hosting over another type of hosting.  This post is to help answer some of those entry-level questions.</p>

<h2>Why should I pay when I can get FREE hosting?</h2>
<img src="http://www.benjaminbradley.com/wp-content/uploads/2012/05/free-sign-150x150.gif" alt="" title="free-sign" width="150" height="150" class="alignleft size-thumbnail wp-image-697" /><p>Yes, there are still clients and people who ask this question.  They might have received some notification that their ISP provides them with free web space, or a company offers to host blogs for free.  Rather than pay a monthly hosting fee, you agree to allow ads to be placed on your webspace. (100% of the ads go to the company providing the free space.) There will be limited options to modify the content on your page as well as restrictions (or even lack of access) to a database and other basic server functionalities. And normally, with a free hosting option, the URL contains the domain name of the hosting company.  Example: http://www.freeweb4hosting.com/bobsburgers</p>

<h2>They want me to SHARE my hosting?</h2>
<img src="http://www.benjaminbradley.com/wp-content/uploads/2012/05/shared-hosting-150x150.png" alt="" title="shared-hosting" width="150" height="150" class="alignright size-thumbnail wp-image-700" /><p>No, <em>shared hosting</em> doesn't mean multiple people will be using your website. It means that multiple (many times <b>thousands and thousands</b> of other customers will be sharing the <em>resources of the server</em>. Monthly fees are low which means its ideal for simple websites or personal sites. But a major problem with shared hosting is that since the server is shared among many websites, all websites share the server’s resources. This means if one website experiences high traffic, every website on the server will be slow. All the websites might share a single IP address, so if one website gets the IP address blocked, your website will also be blocked.</p>

<h2>VPS Hosting... didn't I see that on Star Trek?</h2>
<img src="http://www.benjaminbradley.com/wp-content/uploads/2012/05/vpsserver-150x150.jpg" alt="" title="vpsserver" width="150" height="150" class="alignleft size-thumbnail wp-image-702" /><p>Many times, the next step up from <em>shared hosting</em> is a VPS server.  VPS simply means a <em>virtual</em> private server.  It means you are still sharing the server resources with other websites on the same server as your site, but the resources are <b>partitioned</b>. It acts like a dedicated server by giving each website has an allotment of bandwidth, RAM and CPU usage. You get a control panel to customize your website and add databases as needed for inventory or to customize your website. You will also have a unique IP address like you would with a dedicated server. VPS hosting is priced between shared and dedicated hosting.</p>
<span id="more-696"></span>
<h2>Dedicated means expensive right???</h2>
<img src="http://www.benjaminbradley.com/wp-content/uploads/2012/05/dedicated-server-150x150.jpg" alt="" title="dedicated-server" width="150" height="150" class="alignright size-thumbnail wp-image-703" /><p>Dedicated servers means that you (the owner of the dedicated server) control everything about the server.  You control how many sites are on the server, how the resources get distributed, when the server gets updated, and much more. Running a server requires a lot of knowledge, so you will need to hire someone to set up your website and perform maintenance if you are not proficient in web development and server operation. The above three options all put some of your <em>online business</em> at the mercy of other website owners. But a dedicated server, while being the most expensive of all options, gives you the most control.  If uptime and control is what your site needs, dedicated servers are the way to go.</p>

<h2>Recommendations</h2>
<a href="http://buildawebsite.com"><img alt="" src="https://www.buildawebsite.com/assets/images/logo.jpg" title="Build a Website" class="alignnone" width="270" height="177" /></a><a href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=webworld"><img src="http://www.benjaminbradley.com/wp-content/uploads/2012/05/hostgator-logo-300x262.gif" alt="" title="hostgator-logo" width="270" height="177" class="alignright size-medium wp-image-705" /></a>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/newbies-guide-to-web-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set Maximum Post Title Length</title>
		<link>http://www.benjaminbradley.com/set-maximum-post-title-length/</link>
		<comments>http://www.benjaminbradley.com/set-maximum-post-title-length/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 12:27:32 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[title]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=672</guid>
		<description><![CDATA[You might have developed the perfect custom theme for a client. Everything looks perfect and because you're using WordPress it is very easy for the client to update the site. But then one day you take a look at the site and something went wrong... because the client just wrote a post with a title [...]]]></description>
			<content:encoded><![CDATA[<p>You might have developed the perfect custom theme for a client.  Everything looks perfect and because you're using WordPress it is very easy for the client to update the site.  But then one day you take a look at the site and something went wrong... because the client just wrote a post with a title that looks like this:</p>

<h2>The Perfect Way to Create a Core Web Application Development with PHP and MySQL while Managing Complex User Equations that are Maximized by the Global Time Exchange Pass-Loss during the Communicative Process of Client-Server Ghosting</h2>

<p>So... the title is WAY TOO LONG... and it breaks the mold of the site that you spent hours crafting.  This little code snippet will set a maximum amount of words allowed in the Post Title field.  In the example code below, we have set the maximum number of words in the Post Title to 10.  If there are more than 10 words, we will return an error message telling the client to shorten their title.  This code goes in your active theme's <em>functions.php</em> file.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> maxTitleLength<span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">str_word_count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>
    wp_die<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error: your post title is over the maximum word count.'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'publish_post'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'maxTitleLength'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/set-maximum-post-title-length/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force WordPress Admin to use SSL</title>
		<link>http://www.benjaminbradley.com/force-wordpress-admin-to-use-ssl/</link>
		<comments>http://www.benjaminbradley.com/force-wordpress-admin-to-use-ssl/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 14:16:40 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tweak]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=668</guid>
		<description><![CDATA[A helpful security tip when using WordPress is to force your WordPress Admin Dashboard to use Secure Socket Layer (SSL). Remember that you need to already have SSL setup on your domain. This code goes in your wp-config.php file and will force your Admin Dashboard to use https:// instead of http://. define&#40;'FORCE_SSL_ADMIN', true&#41;;]]></description>
			<content:encoded><![CDATA[<p>A helpful security tip when using WordPress is to force your WordPress Admin Dashboard to use Secure Socket Layer (SSL).  Remember that you need to already have SSL setup on your domain.  This code goes in your <em>wp-config.php</em> file and will force your Admin Dashboard to use <b><em>https://</em></b> instead of <b><em>http://</em></b>.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FORCE_SSL_ADMIN'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


 ]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/force-wordpress-admin-to-use-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the WordPress Read More Text</title>
		<link>http://www.benjaminbradley.com/changing-the-wordpress-read-more-text/</link>
		<comments>http://www.benjaminbradley.com/changing-the-wordpress-read-more-text/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 16:16:11 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tweak]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Read More]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=651</guid>
		<description><![CDATA[WordPress has a built-in ability to split a post or block of content into two parts. This is traditionally used to only show a portion or excerpt of the post on the front page of a blog, and then the reader can click on a link to read the full version of the post/content. Out-of-the-box [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress has a built-in ability to <em>split</em> a post or block of content into two parts.  This is traditionally used to only show a portion or excerpt of the post on the front page of a blog, and then the reader can click on a link to read the full version of the post/content.  Out-of-the-box the text of the link that readers click on to view the full version of the post says <em>Read More</em>.  If you want to change the text all you have to do is add the following code to your active theme's <em>functions.php</em> file.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$custom_morelink</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Continue Reading the Full Article&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> change_more_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$more_link</span><span style="color: #339933;">,</span> <span style="color: #000088;">$more_link_text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$more_link_text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$custom_morelink</span><span style="color: #339933;">,</span> <span style="color: #000088;">$more_link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content_more_link'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'change_more_link'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>Make sure you replace the text <em>Continue Reading the Full Article</em> with your own text that you want to appear instead of the standard <em>Read More</em>.</p>

<p><b>Update:</b> Forgot to mention a simple way to change just one <em>Read More</em> text link.  For example: you can use the above PHP code to change every single <em>Read More</em> text, but you can also just use a simple method to change the text directly in the WordPress <em>more tag</em>.</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt; !--more Continue Reading the Full Article--&gt;</pre></div></div>




<p>And just in case you forgot what the standard/default WordPress <em>more tag</em> looks like...</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt; !--more--&gt;</pre></div></div>




<p>So you see, by simply adding the text you want to appear (instead of the <em>Read More</em> text) inside the <em>more tag</em>, you have extra control over the look of your site.</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/changing-the-wordpress-read-more-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Snippet &#8211; Border Radius</title>
		<link>http://www.benjaminbradley.com/css-snippet-border-radius/</link>
		<comments>http://www.benjaminbradley.com/css-snippet-border-radius/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 10:04:48 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[radius]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=640</guid>
		<description><![CDATA[Example Code .element &#123; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; &#125; What the Code is Doing... When we want rounded corners to appear on our elements, we need to not only use the border-radius declaration, but we also need to utilize the vendor specific declarations (-webkit-border-radius &#038; -moz-border-radius) because "rounded corners" are not standard yet. [...]]]></description>
			<content:encoded><![CDATA[<h2>Example Code</h2>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.element</span> <span style="color: #00AA00;">&#123;</span>
  -webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  -moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>




<h2>What the Code is Doing...</h2>
<p>When we want rounded corners to appear on our elements, we need to not only use the <em>border-radius</em> declaration, but we also need to utilize the vendor specific declarations (<em>-webkit-border-radius</em> &#038; <em>-moz-border-radius</em>) because "rounded corners" are not standard yet.  If we only want a uniform (all four corners rounded the same way) we only need to use a single number (<em>10px</em>).  But you can also do some more creative rounded corners by utilizing the box-model and specifying each corner's radius.  Example:  <em>border-radius: 10px 5px 25px 17px;</em></p>
<span id="more-640"></span>
<h2>Browser Support</h2>
<p>Using the standard <em>border-radius</em> declaration</p>
<ul><li>Internet Explorer 9+</li>
<li>Firefox 4+</li>
<li>Chrome 5+</li>
<li>Safari 5+</li>
<li>Opera 10.5+</li></ul>

<p>Using the vendor specific declarations (<em>-webkit-border-radius</em> &#038; <em>-moz-border-radius</em>)</p>
<ul><li>Firefox 2+</li>
<li>Chrome 4</li>
<li>Safari 3.1+</li></ul>

<h2>Demo</h2>
<div class="radius-wrapper">
This block has rounded corners.
</div>

<h2>More Information</h2>

<p>You can read more about <em>Border Radius</em> over on the official <a href="http://dev.w3.org/csswg/css3-background/#the-border-radius">W3C page on css3 backgrounds</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/css-snippet-border-radius/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add Menu Items to Admin Toolbar</title>
		<link>http://www.benjaminbradley.com/add-menu-items-to-admin-toolbar/</link>
		<comments>http://www.benjaminbradley.com/add-menu-items-to-admin-toolbar/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 00:11:39 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=631</guid>
		<description><![CDATA[One of the easiest ways to brand WordPress when doing client work is to add your web design business to the WordPress Admin Toolbar. Adding links and menu items to the WordPress Admin Toolbar is easily done through a simple add_action WordPress hook. In this example, we are adding a link to a fictitious webdev [...]]]></description>
			<content:encoded><![CDATA[<p>One of the easiest ways to <em>brand</em> WordPress when doing client work is to add your web design business to the WordPress Admin Toolbar. Adding links and menu items to the WordPress Admin Toolbar is easily done through a simple <em>add_action</em> WordPress hook.  In this example, we are adding a link to a fictitious webdev studio, as well as drop-down links to the Support, Billing, and News Updates of said fictitious webdev studio.</p>

<p>This code can be placed in the active theme's <em>functions.php</em> file.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> easy_add_menu_items_to_toolbar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>is_super_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>is_admin_bar_showing<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'webdev_links'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Awesome WebDev'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'webdev_links'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'support'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Get Support'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com/support'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'webdev_links'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'billing'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pay Your Bill'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com/billing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'webdev_links'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'news'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Latest News'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com/news'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_bar_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'easy_add_menu_items_to_toolbar'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>As you can see, each time we <em>add_menu</em> to the <em>$wp_admin_bar</em> we setup an array.  Inside the array we have four different options.</p>
<ul><li><em>'parent'</em> - This is how we create a drop down menu.  If you want a menu item to have a parent, you place the parent's <em>'id'</em> inside your array.</li>
<li><em>'id'</em> - This is the unique name for each menu item.</li>
<li><em>'title'</em> - This is the text that appears to the end-user on the Toolbar menu item.</li>
<li><em>'href'</em> - This is the url location of where you want the user to go when they select the menu item.</li></ul>

<p>If you wanted to take it a step further, you could also assign CSS classes to individual menu items... which would be a great way to integrate icons/graphics into your WordPress Admin Toolbar.  The following code will assign a CSS class of <em>super-css-class</em> to this newly added specific WordPress Admin Toolbar menu item.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'super_css'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Super CSS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com/supercss'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'meta'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'super-css-class'</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p><b>Bonus Content:</b> You can also use this exact same code to remove items from the default WordPress Admin Toolbar.  I prefer to create a different function when removing items.  This way the adding of content happens in one function and the removing of content happens in another function.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> remove_admin_toolbar_links<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">remove_menu</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-logo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">remove_menu</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'updates'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_before_admin_bar_render'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_admin_toolbar_links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>The above code removes the WordPress logo from the Admin Toolbar and also the section that shows there are updates to WordPress (great to remove from clients).  You can remove everything if you want and simply recreate the WordPress Admin Toolbar into a completely different beast.  If you want to go down that road, here are the names of the sections you might want to remove.</p>
<ul><li><em>wp-logo</em> - the WordPress logo</li>
<li><em>my-account</em> - links to your account. The ID depends upon if you have avatar enabled or not.</li>
<li><em>site-name</em> - site name with other dashboard items</li>
<li><em>my-sites</em> - the <b>My Sites</b> menu (if you have more than one site, multisite)</li>
<li><em>get_shortlink</em> - shortlink to the post/page</li>
<li><em>edit</em> - Post/Page/Category/Tag edit link</li>
<li><em>new-content</em> - <b>Add New</b> menu</li>
<li><em>comments</em> - <b>Comments</b> menu</li>
<li><em>updates</em> - <b>Updates</b> menu</li>
<li><em>search</em> - Search box</li></ul>
<p>Are you currently modifying the WordPress Admin Toolbar for yourself or your clients?</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/add-menu-items-to-admin-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a Search Box to WordPress Navigation</title>
		<link>http://www.benjaminbradley.com/add-a-search-box-to-wordpress-navigation/</link>
		<comments>http://www.benjaminbradley.com/add-a-search-box-to-wordpress-navigation/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 13:16:21 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.benjaminbradley.com/?p=602</guid>
		<description><![CDATA[You've all seen sites that have a built-in search box as part of a navigation bar. With WordPress, it is really easy to do. All we have to do is add a search form to the list of navigational items through a filter. This code would go into your active theme's functions.php file. Caution: You [...]]]></description>
			<content:encoded><![CDATA[<p>You've all seen sites that have a built-in search box as part of a navigation bar.  With WordPress, it is really easy to do.  All we have to do is add a search form to the list of navigational items through a filter.  This code would go into your active theme's <em>functions.php</em> file.  <b>Caution</b>: You will need to replace the <em>INSERT-YOUR-MENU</em> text with the actual name of your custom menu you create in WordPress.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> add_search_form<span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">theme_location</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'MENU-NAME'</span> <span style="color: #009900;">&#41;</span>
        <span style="color: #000088;">$items</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;li class=&quot;search&quot;&gt;&lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;'</span><span style="color: #339933;">.</span>home_url<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'/'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;&lt;input type=&quot;text&quot; value=&quot;search&quot; name=&quot;s&quot; id=&quot;s&quot; /&gt;&lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;'</span><span style="color: #339933;">.</span> esc_attr__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Search'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;&lt;/form&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$items</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_nav_menu_items'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_search_form'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>There really are a number of ways to do this, but with this code it doesn't matter what theme you are using, it will simply filter in a search form as an additional menu item in the navigational menu list.</p>]]></content:encoded>
			<wfw:commentRss>http://www.benjaminbradley.com/add-a-search-box-to-wordpress-navigation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

