<?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>Adrogen Blog &#187; WordPress</title>
	<atom:link href="http://www.adrogen.com/blog/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adrogen.com/blog</link>
	<description>our thoughts online</description>
	<lastBuildDate>Mon, 12 Apr 2010 23:03:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress wp-blog-header.php Causes 404 in IE</title>
		<link>http://www.adrogen.com/blog/wordpress-wp-blog-headerphp-causes-404-in-ie/</link>
		<comments>http://www.adrogen.com/blog/wordpress-wp-blog-headerphp-causes-404-in-ie/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 16:19:34 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.adrogen.com/blog/?p=20</guid>
		<description><![CDATA[I ran into a very interesting problem today.  WordPress is great as a CMS, but sometimes for special functionality on specific pages you just need to go outside of the shell, but the great thing is, you can still use the framework right?  By including
&#60;?php require('./wp-blog-header.php'); ?&#62;
on the top of your page, you [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a very interesting problem today.  WordPress is great as a CMS, but sometimes for special functionality on specific pages you just need to go outside of the shell, but the great thing is, you can still use the framework right?  By including</p>
<pre name="code" class="php">&lt;?php require('./wp-blog-header.php'); ?&gt;</pre>
<p>on the top of your page, you still have access to all the WordPress functions and code library.  Which is great, because if your Navigation is built through a WP page hierarchy, you can still have access to it, and any changes in the backend will be reflected on your orphaned page.</p>
<p>All is right with the world.</p>
<p>Or so it seems.  The underlying problem with this is when you include the all encompassing &#8220;wp-blog-header.php&#8221; it tries to put this page in the framework.  And the way the framework operates when permalinks are in place is completely database driven.  So if an actual file exists in a sub directory, but it isn&#8217;t a part of the WordPress hierarchy, WordPress sends out a 404 header.  Now there&#8217;s a conflict, because the browser is getting a 404 header, but a file actually exists in the location.  Firefox and some versions of IE interpret this fine, but some versions of IE don&#8217;t.  And more importantly, neither does Googlebot&#8230; which means you&#8217;re page isn&#8217;t going to get indexed.</p>
<p>Fortunately, there&#8217;s a relatively easy way to get around this.  Basically, don&#8217;t include wp-blog-header.  I can already hear the virtual screams:</p>
<blockquote><p><em><strong>But but but!  I want the tags!  Isn&#8217;t that the whole point?! *anger* *confusion* *lamentations*</strong></em></p>
</blockquote>
<p>It&#8217;s definitely the point.  And luckily, there&#8217;s a relatively easy way to accomplish this.  Basically, we just want to include the specific functions of WordPress without making this specific page or pages part of the CMS.  So don&#8217;t include wp-blog-header.php at the top.  Use this instead:</p>
<pre name="code" class="php">&lt;?php
       require('./wp-config.php');
       $wp-&gt;init();
       $wp-&gt;parse_request();
       $wp-&gt;query_posts();
       $wp-&gt;register_globals();
?&gt;</pre>
<p>This will only pull the specific framework functions without putting the page as a part of the whole.  In essence, WordPress won&#8217;t look for the corresponding page or post with &#8220;/your-sub-directory/&#8221;, but you&#8217;ll still be able to use all of the functions such as wp_head().</p>
<p>
And you thought nonsensical 404&#8217;s couldn&#8217;t  be fun&#8230; for shame.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adrogen.com/blog/wordpress-wp-blog-headerphp-causes-404-in-ie/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>jQuery: $ is not a function</title>
		<link>http://www.adrogen.com/blog/jquery-conflict-is-not-a-function/</link>
		<comments>http://www.adrogen.com/blog/jquery-conflict-is-not-a-function/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 17:41:16 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://adrogen.com/blog/?p=9</guid>
		<description><![CDATA[Recently I ran into an issue  while trying to use jQuery on a custom WordPress based Content Management System.  This particular system had a number of instances in which the framework was being referenced.  Normally you insert jQuery code using the dollar sign ($) like so:
$(document).ready(function() {
   $("a").click(function() {
     [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I ran into an issue  while trying to use jQuery on a custom WordPress based Content Management System.  This particular system had a number of instances in which the framework was being referenced.  Normally you insert jQuery code using the dollar sign ($) like so:</p>
<pre name="code" class="js">$(document).ready(function() {
   $("a").click(function() {
     alert("Hello world!");
   });
 });</pre>
<p>The problem arises when a different system grabs the $ variable.  All of the sudden you have multiple $ variables being used as objects from multiple libraries, resulting in the error console message <strong>&#8220;$ is not a function&#8221;</strong>.</p>
<p>Fortunately there is a pretty easy way of fixing this in the form of jQuery.noConflict.  Running this function gives control of the $ variable back to whichever library first implemented it.  This will help to ensure that jQuery won&#8217;t conflict with other instances of the $ object in other libraries.</p>
<p>But please note, in doing this, you are re-assigning the variable so you will only be able to access jQuery commands using the &#8216;jQuery&#8217; variable (which has just replaced &#8216;$&#8217;).  So our above code example would look something like this:</p>
<pre name="code" class="js">jQuery.noConflict();
jQuery(document).ready(function() {
   jQuery("a").click(function() {
     alert("Hello world!");
   });
 });</pre>
<p>It doesn&#8217;t seem to be a very common problem and only occurs when multiple instances of the object crop up, but that&#8217;s easy to do in WordPress when multiple plugins begin conflicting with each other.   Follow the link for the  full jQuery documentation on <a href="http://docs.jquery.com/Core/jQuery.noConflict" target="_blank">jQuery.noConflict</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adrogen.com/blog/jquery-conflict-is-not-a-function/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
