<?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>Kenny Carlile &#187; WordPress</title>
	<atom:link href="http://www.kennycarlile.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kennycarlile.com</link>
	<description>Use Only Genuine Interocitor Parts</description>
	<lastBuildDate>Sat, 24 Apr 2010 07:38:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress – Making Yoast Breadcrumbs Behave Like A Good Boy</title>
		<link>http://www.kennycarlile.com/2010/04/04/wordpress-%e2%80%93-making-yoast-breadcrumb-behave-like-a-good-boy/</link>
		<comments>http://www.kennycarlile.com/2010/04/04/wordpress-%e2%80%93-making-yoast-breadcrumb-behave-like-a-good-boy/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 08:38:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=709</guid>
		<description><![CDATA[I mentioned in a recent post (okay, very recent) that Yoast Breadcrumbs needed some tweaking to get it to behave the way I wanted it to. This post will outline the changes that I made to my theme to get Yoast Breadcrumbs to cooperate. First, check to see if the plugin is installed and enabled. [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned <a href="http://www.kennycarlile.com/2010/04/03/yet-another-list-of-recommended-wordpress-plugins/">in a recent post</a> (okay, <em>very</em> recent) that <a href="http://yoast.com/wordpress/breadcrumbs/" target="_blank">Yoast Breadcrumbs</a> needed some tweaking to get it to behave the way I wanted it to. This post will outline the changes that I made to my theme to get Yoast Breadcrumbs to cooperate.</p>
<p>First, check to see if the plugin is installed and enabled. If it is, let&#039;s get the output from the plugin:</p>
<pre>&lt;?php
    if(function_exists('yoast_breadcrumb'))
    {
        $breadcrumbs = yoast_breadcrumb("", "", false);
        ...
    } // end if test
?&gt;
</pre>
<p>The first issue that I ran into is that even though I had <em>Separator between breadcrumbs</em> in the configuration set to <strong>&amp;amp;raquo;</strong>, it was still throwing out <strong>»</strong> (rather than the HTML entity). To force that, I added this line:</p>
<pre>$breadcrumbs = str_replace("»", "&amp;raquo;", $breadcrumbs);</pre>
<p>Since I was using a static page as my homepage and since I had all my breadcrumbs prefaced with a hyperlink to KennyCarlile.com (linked to root), I didn&#039;t want it to appear as <a href="/">KennyCarlile.com</a> » <a href="/">About</a>. That would just be silly. But, I wanted that root link to preface all my other pages, so I just wanted to hide the » <a href="/">About</a> part.</p>
<pre>        if(is_front_page())
        {
            echo '&lt;a href="/"&gt;' . $breadcrumbs .
                '&lt;/a&gt; &amp;raquo; ' .
                '&lt;strong&gt;About&lt;/strong&gt;';
        } // end if test
</pre>
<p>Now we get into the real voodoo and black magic. All other cases should be for pages where we want to display the full breadcrumb. For some reason, it was adding multiple links on occasion, depending on where it was in the site hierarchy. To handle that, I split the breadcrumb into an array, then looked at each position in the array and compared it to the next one to see if they are the same. If they are different, add it to a new array. If they are the same, ignore it and continue on.</p>
<pre>        else
        {
            // split breadcrumb string into array
            $linksArr = split('&amp;raquo;', $breadcrumbs);
            $newLinksArr = array(); // new links array
            $lastIndex = count($linksArr) - 1;

            // look through the links
            for($i = 0; $i &lt;= $lastIndex; $i++)
            {
                // if 2 in a row are NOT the same...
                if(trim($linksArr[$i]) != trim($linksArr[$i + 1]))
                {
                    // ...add to the new array
                    $newLinksArr[] = $linksArr[$i];
                } // end if test
            } // end for loop
</pre>
<p>Okay, no more duplicate breadcrumb links, but now it&#039;s still linking the final breadcrumb. I want to display the page that I&#039;m on in the breadcrumb, but it doesn&#039;t need to be a link. Why link to yourself, right? Here&#039;s some real voodoo. This is your cue to take off running if you hate regular expressions. <img src='http://www.kennycarlile.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>            // get the new array size
            $lastIndex = count($newLinksArr) - 1;

            // looking to extract the text from a hyperlink,
            // replace it with the same word in bold
            $pattern = '/(.*&gt;)([^&lt;]*)(&lt;.*)/';
            $replace = '&lt;strong&gt;$2&lt;/strong&gt;';
            $newLinksArr[$lastIndex] = preg_replace($pattern,
                                            $replace,
                                            $newLinksArr[$lastIndex]);
</pre>
<p>Cool, no more link for the page that we are on. Now we just need to turn that array back into a string and print that string to the output stream and we&#039;re done!</p>
<pre>            // return links array to string
            $breadcrumbs = implode(" &amp;raquo; ", $newLinksArr);    

            echo $breadcrumbs;
        } // end else test
    } // end if test
?&gt;
</pre>
<p>That&#039;s how I solved the limitations of the Yoast Breadcrumbs plugin. I should say that I&#039;m very impressed by what <a href="http://yoast.com/" target="_blank">Yoast</a> was able to do, but it just wasn&#039;t quite what I needed. I&#039;m sure there are plenty of other ways to do this, possibly easier ones too, but this is my solution.</p>
<p>Here&#039;s the full code that I added to my theme to handle the breadcrumbs correctly:</p>
<pre>&lt;?php
    if(function_exists('yoast_breadcrumb'))
    {
        $breadcrumbs = yoast_breadcrumb("", "", false);
        $breadcrumbs = str_replace("»", "&amp;raquo;", $breadcrumbs);

        if(is_front_page())
        {
            echo '&lt;a href="/"&gt;' . $breadcrumbs .
                '&lt;/a&gt; &amp;raquo; ' .
                '&lt;strong&gt;About&lt;/strong&gt;';
        } // end if test
        else
        {
            // split breadcrumb string into array
            $linksArr = split('&amp;raquo;', $breadcrumbs);
            $newLinksArr = array(); // new links array
            $lastIndex = count($linksArr) - 1;

            // look through the links
            for($i = 0; $i &lt;= $lastIndex; $i++)
            {
                // if 2 in a row are NOT the same...
                if(trim($linksArr[$i]) != trim($linksArr[$i + 1]))
                {
                    // ...add to the new array
                    $newLinksArr[] = $linksArr[$i];
                } // end if test
            } // end for loop

            // get the new array size
            $lastIndex = count($newLinksArr) - 1;

            // looking to extract the text from a hyperlink,
            // replace it with the same word in bold
            $pattern = '/(.*&gt;)([^&lt;]*)(&lt;.*)/';
            $replace = '&lt;strong&gt;$2&lt;/strong&gt;';
            $newLinksArr[$lastIndex] = preg_replace($pattern,
                                            $replace,
                                            $newLinksArr[$lastIndex]);

            // return links array to string
            $breadcrumbs = implode(" &amp;raquo; ", $newLinksArr);    

            echo $breadcrumbs;
        } // end else test
    } // end if test
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/04/04/wordpress-%e2%80%93-making-yoast-breadcrumb-behave-like-a-good-boy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Displaying Custom-Formatted Links To Page Children</title>
		<link>http://www.kennycarlile.com/2010/04/03/wordpress-displaying-custom-formatted-links-to-page-children/</link>
		<comments>http://www.kennycarlile.com/2010/04/03/wordpress-displaying-custom-formatted-links-to-page-children/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 07:40:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=694</guid>
		<description><![CDATA[This is just a quick and easy tip, but it was harder to find the answer to than I would have expected. (&#8230;or maybe I just didn&#039;t appease the Google Gods correctly when searching.) If you have a page hierarchy within your WordPress site and you want to display (such as in the sidebar) the [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick and easy tip, but it was harder to find the answer to than I would have expected. (&#8230;or maybe I just didn&#039;t appease the Google Gods correctly when searching.)</p>
<p>If you have a page hierarchy within your WordPress site and you want to display (such as in the sidebar) the immediate children of the current page that you&#039;re on, here&#039;s the code to do it.</p>
<pre>&lt;?php
    // will display the subpages of this top level page
    $children = wp_list_pages("title_li=&amp;child_of=" . $post-&gt;ID . "&amp;echo=0");
    if ($children)
    {
        // custom formatting goes here, just print
        // $children when you want to render the link
        echo '&lt;div id="pagelist"&gt;' . "\n";
        echo "&lt;ul&gt;\n$children\n&lt;/ul&gt;\n";
        echo '&lt;/div&gt; &lt;!-- end div id="pagelist" --&gt;' . "\n";
    } // end if test
?&gt;</pre>
<p>Please note that this method only lets you custom format the display around the actual link. <code class="prettyprint">wp_list_pages()</code> will return the text with the anchor link already wrapped around it. I haven&#039;t dug into how to further format the link.</p>
<p>I hope that helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/04/03/wordpress-displaying-custom-formatted-links-to-page-children/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yet Another List Of Recommended WordPress Plugins</title>
		<link>http://www.kennycarlile.com/2010/04/03/yet-another-list-of-recommended-wordpress-plugins/</link>
		<comments>http://www.kennycarlile.com/2010/04/03/yet-another-list-of-recommended-wordpress-plugins/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 02:51:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=680</guid>
		<description><![CDATA[I know there have been a zillion and a half posts written about the best plugins for WordPress, but I thought I would throw my hat in the ring and offer up my favorites. Some are the common ones that you&#039;ll find on many other lists, but some are ones that I&#039;ve had to dig [...]]]></description>
			<content:encoded><![CDATA[<p>I know there have been a zillion and a half posts written about the best plugins for WordPress, but I thought I would throw my hat in the ring and offer up my favorites. Some are the common ones that you&#039;ll find on many other lists, but some are ones that I&#039;ve had to dig for to fulfill a unique need that I had. If you&#039;re a WordPress veteran, maybe you&#039;ll find a gem in this list that you apply to your site. If you&#039;re new to WordPress, you&#039;ll likely find many of the plugins on this list that you&#039;ll want to add to your site.</p>
<p><a href="http://akismet.com/" target="_blank"><strong>Akismet</strong></a> &#8211; There&#039;s a reason why this plugin comes stock with WordPress. If you allow users to comment on your site, you definitely want to use Askimet to help prevent spam. It&#039;s not perfect, but it&#039;s really, really good. If you have a very high traffic site, you may want to incorporate some additional spam protection, like a CAPTCHA or some other means, but Askimet does a pretty good job for most needs. The only gotcha is that you need to request an API key from Askimet to use it. The good news is that you can use that key across many WP sites.</p>
<p><a href="http://semperfiwebdesign.com/" target="_blank"><strong>All In One SEO Pack</strong></a> &#8211; If you want to improve the Search Engine Optimization (SEO) for your site, this plugin provides a lot of enhancements for you. This plugin offers a lot of customization, but, frankly, I mostly leave it as is. I&#039;ll fill in the meta description and meta keywords and then leave the rest as is.</p>
<p><a href="http://wpaudioplayer.com/" target="_blank"><strong>Audio Player</strong></a> &#8211; I didn&#039;t like the default WP hosting functionality for audio files as I wanted to be able to have a small inline player. After a little bit of digging, I found Audio Player and I was quite impressed with the visual customizations that you can do through the admin interface to make it fit with your theme. Be sure to check out this plugin if you want to host playable (not just downloadable) music or podcasts.</p>
<p><a href="http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/" target="_blank"><strong>Dagon Design Sitemap Generator</strong></a> &#8211; While the Google XML Sitemaps plugin generates a sitemap.xml file for search engines to read, it&#039;s HTML sitemap is less than desirable. This plugin lets you create a page and then drop a code anywhere in the page to render a customizable, paged sitemap.</p>
<p><a href="http://www.mansjonasson.se/enable-media-replace" target="_blank"><strong>Enable Media Replace</strong></a> &#8211; Recently, I needed to replace some images on my photography site, <a href="http://www.528digital.com">528Digital.com</a>. I was disappointed to learn that my options were to either manually FTP and replace the image (maintaining the same file dimensions and name manually) or to delete the image, upload a new one, and then re-insert that new image into the post. That was unacceptable to me. Thankfully, I ran into this plugin that just adds one little bit of functionality to the Edit mode in managing your media that allows you to replace the file by uploading a new one. It maintains the same references, filename, etc., so you don&#039;t have to make any further edits. Just replace and you&#039;re done!</p>
<p><a href="http://bluesome.net/post/2005/08/18/50/" target="_blank"><strong>Exec-PHP</strong></a> &#8211; To be honest, I&#039;m not sure if I can remember an instance when I&#039;ve used this, except for with <a href="/professional/code/picasawebscraper/">PicasaWebScraper</a>, but I like to have it installed for the case when I might need it some day. It allows you to put executable PHP into the body of your posts or pages. This is great when you want to use WP as more of a content management system and you need to inject some dynamic functionality. You should, however, be careful with this plugin if you have non-technical users as they could cause a problem or break some PHP code written by someone else when editing content. <strong>EDIT:</strong> I recently found that <a href="http://www.nosq.com/blog/runphp/" target="_blank">runPHP</a> has some of the features that Exec-PHP lacks, such as enabling for a specific page/post and you can specify access by role.</p>
<p><a href="http://www.arnebrachhold.de/redir/sitemap-home/" target="_blank"><strong>Google XML Sitemaps</strong></a> &#8211; This plugin generates an XML sitemap of your site&#039;s content for search engines to read. This helps with content indexing for search engines and you can leverage it using Google&#039;s Webmaster Tools to check for broken links.</p>
<p><a href="http://www.vtardia.com/improved-include-page/" target="_blank"><strong>Improved Include Page</strong></a> &#8211; I only used this plugin briefly before I changed my mind on how I wanted to do something, but it allows you to include page content within your theme. For example, you might want a small block of a theme that appears on every page that is editable via the normal page/post editing means, rather than just through manual editing of a text widget.</p>
<p><a href="http://adambrown.info/b/widgets/category/kb-advanced-rss/" target="_blank"><strong>KB Advanced RSS Widget</strong></a> &#8211; WordPress comes with an RSS widget, but the styling/display options are practically non-existent. If you want to be able to style the display of your RSS widget to fit within your theme, you definitely want to try this plugin.</p>
<p><a href="http://www.stimuli.ca/lightbox/" target="_blank"><strong>Lightbox 2</strong></a> &#8211; I&#039;m sure you&#039;ve seen those fancy image popups where the rest of the page looks like you&#039;ve turned the lights down while a big version of the image you clicked on is displayed in the foreground: that&#039;s Lightbox. There are a lot of other plugins and features that can use Lightbox, but you can also use it by itself.</p>
<p><a href="http://blogplay.com/plugin" target="_blank"><strong>Sociable</strong></a> &#8211; If you&#039;ve ever wanted to add those little icons to a dozen or more different social media sites for users to submit your links, this is the plugin you need. It&#039;s highly configurable with many, many different social sites to choose from, and it includes links to email and print the content.</p>
<p><a href="http://www.laptoptips.ca/projects/tinymce-advanced/" target="_blank"><strong>TinyMCE Advanced</strong></a> &#8211; I really don&#039;t know why this isn&#039;t part of the default install of WordPress. Maybe there are other options that people like so they leave it up to you to choose which plugin you want to use, but the default WYSIWYG editor is really insufficient for anything more than basic rich text editing. With this plugin, you get a lot of the missing functionality and a lot of customization to suit your needs.</p>
<p><a href="http://www.semiologic.com/software/unfancy-quote/" target="_blank"><strong>Unfancy Quote</strong></a> &#8211; I really hate curly quotes. You know, the ones that MS Word gives you. WordPress has curly quotes by default so your quoted text “looks like” this &#034;rather than like this&#034;. Maybe it&#039;s because I&#039;m a programmer, but I pretty much never want curly quotes unless I&#039;m writing a novel, in which case I will use Word. This plugin changes the default rendering of quotes so that they appear as you actually enter them.</p>
<p><a href="http://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/" target="_blank"><strong>Viper&#039;s Video Quicktags</strong></a> &#8211; Embedding videos into your posts can sometimes be tricky. Viper&#039;s Video Quicktags plugin helps make this process easier and it&#039;s customizable. This works especially well if you use YouTube a lot. You can even specify the default dimensions of the player, which really helps.</p>
<p><strong><a href="http://lesterchan.net/portfolio/programming/php/" target="_blank">WP-DBManager</a></strong> &#8211; I&#039;ve always been paranoid about losing the data in my blog. I ran into this plugin a year or so ago, which not only regularly backs up your WP install, but it also emails you the file. I&#039;ve been using this on every WP site since.</p>
<p><a href="http://ocaoimh.ie/wp-super-cache/" target="_blank"><strong>WP Super Cache</strong></a> &#8211; Super Cache is a bit of a dual-edged sword because if you forget that you&#039;re running it, it can cause quite a headache. It caches your WP pages into static content so they can be served much more quickly. This is great if your site hits Digg or gets Slashdotted, but if you&#039;re trying to debug a theme tweak or some other change, it can be a huge pain if you forgot to turn it off. The other thing about this plugin is that if you&#039;re reading my blog, your site probably doesn&#039;t get enough hits for you to really need this. And yes, I know I don&#039;t need it either. <img src='http://www.kennycarlile.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://yoast.com/wordpress/breadcrumbs/" target="_blank"><strong>Yoast Breadcrumbs</strong></a> &#8211; If you want to use breadcrumb navigation on your site, this is the best plugin I&#039;ve found, and even this needed some behavior modification at the page-render level. I&#039;ll probably post up the details of those tweaks at a later date, but this is a really good place to start if you want breadcrumbs. [Edit: <a href="http://www.kennycarlile.com/2010/04/04/wordpress-%E2%80%93-making-yoast-breadcrumb-behave-like-a-good-boy/">Here's the link to the post</a> I mentioned that I would write.]</p>
<p>If you&#039;ve got any must-have plugins that you&#039;d like to recommend, I&#039;d love to hear about them. Leave a comment with your thoughts, a description, and a link to the plugin if you want to suggest one. Happy WordPressing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/04/03/yet-another-list-of-recommended-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.5.1 Bug &#8211; Admin Can&#039;t Publish</title>
		<link>http://www.kennycarlile.com/2008/07/14/wordpress-251-bug-admin-cant-publish/</link>
		<comments>http://www.kennycarlile.com/2008/07/14/wordpress-251-bug-admin-cant-publish/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 06:23:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=87</guid>
		<description><![CDATA[In WordPress 2.5.1, after you&#039;ve created additional publishing users, the administrator account can no longer publish posts or pages. Or rather, the administrator can publish, but it appears under another user&#039;s name as the administrator&#039;s account is not an option in the drop down. After quite some digging, I found a solution, or rather a [...]]]></description>
			<content:encoded><![CDATA[<p>In WordPress 2.5.1, after you&#039;ve created additional publishing users, the administrator account can no longer publish posts or pages. Or rather, the administrator can publish, but it appears under another user&#039;s name as the administrator&#039;s account is not an option in the drop down.</p>
<p>After quite some digging, I found a solution, or rather a work-around, <a href="http://wordpress.org/support/topic/169422">posted by jmrussell on this WordPress forum</a>:</p>
<ul>
<li>Once the error occurs, go to the Users page in the admin section of the site</li>
<li>Select the checkbox next to the administrator&#039;s name
</li>
<li>In the dropdown above, set &#034;Change role to&#8230;&#034; to Administrator and then, with the administrator only selected, click Change.</li>
</ul>
<p>Now your administrator should be able to publish. You can go back and edit each post that may have accidentally been published under another username by modifying the Post Author field and setting it to your administrator&#039;s name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/07/14/wordpress-251-bug-admin-cant-publish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove Fancy Quotes From WordPress</title>
		<link>http://www.kennycarlile.com/2008/06/18/remove-fancy-quotes-from-wordpress/</link>
		<comments>http://www.kennycarlile.com/2008/06/18/remove-fancy-quotes-from-wordpress/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 22:09:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=82</guid>
		<description><![CDATA[If you&#039;re annoyed by the fancy quotes that WordPress replaces your normal quotes with (i.e. “these quotes” rather than &#034;these regular quotes&#034;), there&#039;s an easy way to get rid of them. Just use Semiologic&#039;s Unfancy Quote Plugin For WordPress and presto chango, your fancy quotes are gone! I had found some lower-level hacks to WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#039;re annoyed by the fancy quotes that WordPress replaces your normal quotes with (i.e. “these quotes” rather than &#034;these regular quotes&#034;), there&#039;s an easy way to get rid of them. Just use <a href="http://www.semiologic.com/software/wp-tweaks/unfancy-quote/">Semiologic&#039;s Unfancy Quote Plugin For WordPress</a> and presto chango, your fancy quotes are gone!</p>
<p>I had found some lower-level hacks to WordPress and some crazy-complex Javascript that fixed this, but none of them were as simple and easy to use as Semiologic&#039;s solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/18/remove-fancy-quotes-from-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove Generator Field From WordPress Meta</title>
		<link>http://www.kennycarlile.com/2008/06/18/remove-generator-field-from-wordpress-meta/</link>
		<comments>http://www.kennycarlile.com/2008/06/18/remove-generator-field-from-wordpress-meta/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 22:03:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=81</guid>
		<description><![CDATA[WordPress automagically interjects meta content specifying that the generator of the webpage is WordPress and, specifically, what version it is. Like this: &#60;meta name="generator" content="WordPress 2.5.1" /&#62; If you want to remove that, there&#039;s an easy way to do it. If you don&#039;t already have a functions.php file in your theme, create one. Make sure [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress automagically interjects meta content specifying that the generator of the webpage is WordPress and, specifically, what version it is. Like this:</p>
<pre class="prettyprint">&lt;meta name="generator" content="WordPress 2.5.1" /&gt;</pre>
<p>If you want to remove that, there&#039;s an easy way to do it. If you don&#039;t already have a <code class="prettyprint">functions.php</code> file in your theme, create one. Make sure that it starts with <code class="prettyprint">&lt;?php</code> and ends with <code class="prettyprint">?&gt;</code> and has NOTHING outside those tags or it will cause your theme to yak.</p>
<p>Now add the following line to your <code class="prettyprint">functions.php</code> file:</p>
<pre class="prettyprint">remove_action('wp_head', 'wp_generator');</pre>
<p>And that should do it! Now you can go through all your plugins and remove the comments and other garbage they interject in order to try to hide the fact that you&#039;re running WordPress.</p>
<p><strong>Edit:</strong></p>
<p>As Jerry pointed out in the comments, you could still see the generator meta in the RSS feed. I found a <a href="http://www.bioneural.net/2008/04/13/customizing-wordpress-feed-content/">solution to this at Bioneural.net</a>.</p>
<p>Simply add this code to your theme&#039;s <code class="prettyprint">functions.php</code> file.</p>
<pre class="prettyprint">// Remove WP version info
function hide_wp_vers()
{
    return '';
} // end hide_wp_vers function

add_filter('the_generator','hide_wp_vers');</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/18/remove-generator-field-from-wordpress-meta/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Add A Digg Badge To WordPress Posts/Pages</title>
		<link>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/</link>
		<comments>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 20:38:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/</guid>
		<description><![CDATA[I know there are a lot of widgets and plugins for WordPress out there for adding a Digg badge to posts (I know, because I tried half a dozen or so of them) but I didn&#039;t find any that worked consistently and provided the functionality I wanted. After researching the Digg Tools API and a [...]]]></description>
			<content:encoded><![CDATA[<p>I know there are a lot of widgets and plugins for WordPress out there for adding a Digg badge to posts (I know, because I tried half a dozen or so of them) but I didn&#039;t find any that worked consistently and provided the functionality I wanted. After researching the <a href="http://www.digg.com/tools/integrate" target="_blank">Digg Tools API</a> and a few other examples online, I&#039;ve composed this block of code for generating Digg badges.</p>
<p>To add a Digg badge to your WordPress posts or pages, simply add the following code block immediately before or after the PHP block that contains <code class="prettyprint">the_content()</code>. For posts, you would want to modify the Main Index Template, Single Post, and Archives theme files. For pages, you simply need to modify the Page Template theme file. Here&#039;s the code:</p>
<pre class="prettyprint">&lt;div class="diggLink"&gt;
    &lt;script type="text/javascript"&gt;
        digg_url = '&lt;?php the_permalink() ?&gt;';
        digg_title = '&lt;?php the_title(); ?&gt;';
        //digg_topic = 'TOPIC'; // replace TOPIC
        /*
        Use the output buffer to capture the text
        output from the_ID() rather than having
        it rendered to the page.
        */
        digg_bodytext = '&lt;?php
            ob_start();
            the_ID();
            $postID = ob_get_contents();
            ob_end_clean();
            /*
            Get the body of the post, remove HTML,
            remove carriage returns and line feeds,
            escape 's, return only the first 350 char.
            */
            $postObj = get_post($postID, OBJECT);
            $body = strip_tags($postObj-&gt;post_content);
            $body = str_replace(chr(10), '', $body);
            $body = str_replace(chr(13), '', $body);
            $body = addslashes($body);
            echo substr($body, 0, 350);
        ?&gt;';
    &lt;/script&gt;
    &lt;script src="http://digg.com/tools/diggthis.js"
        type="text/javascript"&gt;&lt;/script&gt;
&lt;/div&gt;</pre>
<p>I&#039;ve also added a class to the wrapping DIV and added it to the stylesheet for my theme to style the positioning of the Digg badge. I place the above code right before the <code class="prettyprint">the_content()</code> block and this CSS class is what positions my Digg badge to the right of my posts.</p>
<pre class="prettyprint">.diggLink
{
    float: right;
    margin-bottom: 4px;
    margin-left: 4px;
}</pre>
<p>If you&#039;d like to set your posts to all submit to one particular topic, you can uncomment the line that refers to <code class="prettyprint">digg_topic</code> in the code block and then change <code class="prettyprint">TOPIC</code> to the topic you&#039;d like to use. You can find the list of topics on the <a href="http://www.digg.com/tools/integrate" target="_blank">Digg Tools API</a> page.</p>
<p>If you have any questions, feel free to comment and ask me. By the way, this same code block is currently in use at <a href="http://www.pactenreview.com/" target="_blank">Pac Ten Review</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
