<?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>scriptygoddess</title>
	<atom:link href="http://www.scriptygoddess.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Tue, 16 Mar 2010 17:43:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SEO Plugins and problems with the titles not rewriting (WordPress)</title>
		<link>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 17:20:22 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1633</guid>
		<description><![CDATA[I can&#039;t speak for anyone else who has run into this problem, but I know I have run into it on more than one occasion. Having just figured out my particular issue this time, I&#039;m making a note for myself (and anyone else who may have the same problem).
You may run into this problem if [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I can&#039;t speak for anyone else who has run into this problem, but I know I have run into it on more than one occasion. Having just figured out my particular issue this time, I&#039;m making a note for myself (and anyone else who may have the same problem).</p>
<p>You may run into this problem if you have a template that you have &#034;hardcoded&#034; the header (in my case &#8211; it was a custom page template that actually needed a completely different header than the rest of the site &#8211; so I opted not to use &#034;get_header()&#034; on this template and just put the custom header right there in my custom page template&#8230;)</p>
<p>I *did* remember to include the &#034;wp_head()&#034; &#8211; so that wasn&#039;t the issue (although I have fogotten to do that on other occasions and that will cause all kinds of trouble, including seo plugin stuff not working) &#8211; but in this case &#8211; the other meta tags were coming in &#8211; but the titles weren&#039;t being rewritten.</p>
<p>The problem was the fact that I wasn&#039;t using get_header() &#8211; this must be the function that kicks off the search for that title tag and replaces it with the rewritten titles. <strong>If you don&#039;t use get_header() &#8211; your titles will not be rewritten.</strong></p>
<p><em>You will run into the same problem even if you don&#039;t &#034;hardcode&#034; your header &#8211; and use the &#034;include&#034; line instead: </em></p>
<p><code>include( TEMPLATEPATH . '/header2.php' );</code></p>
<p>Whatever happens with &#034;get_header()&#034; &#8211; you need to run it to get those titles working.</p>
<p>(<strong>I&#039;ve since updated this post &#8211; scroll down to the bottom for the simplest solution!!</strong>)<br />
So if you have a different header for your page template &#8211; what you need to do is <strong>within your header.php</strong> &#8211; determine which header file it should load in&#8230; but ONLY AFTER you have the title tags written out&#8230; You could even use the &#034;is_page_template()&#034; function to figure out which header to pull in.</p>
<p>So my header.php looked something like this for this project I was running into with this:</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;<br />
&lt;title&gt;&lt;?php wp_title('&laquo;', true, 'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;<br />
&lt;?php<br />
if (is_page_template('my-custom-page-template1.php')  || is_page_template('my-custom-page-template2.php')) {<br />
include( TEMPLATEPATH . '/my-custom-page-template-header.php' );<br />
} else {<br />
?&gt;<br />
... rest of the header is here...<br />
&lt;?php } // endif custom page template checking... ?&gt;</code></p>
<p>Now you can put your custom header in that &#034;my-custom-page-template-header.php&#034; (or whatever you want to call it) and on your &#034;my-custom-page-template1.php and my-custom-page-template2.php, etc just use get_header() at the top like normal.</p>
<p><strong>Actually &#8211; here&#039;s an even better/simpler option:</strong></p>
<p>Name your custom header like this:<br />
<strong>header-<em>my-customheader</em>.php</strong>.</p>
<p>Then when you call &#034;get_header()&#034; &#8211; do so like this:</p>
<p><code>get_header('my-customheader');</code></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 06:26:11 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1632</guid>
		<description><![CDATA[When using WordPress as a CMS, I often repurpose the &#034;posts&#034; as other types of content a site may need. For example, news or press releases, or any information that might need the ability to be catgorized and/or tagged (like testimonials). However, this may mean that you need a completely different template for your news [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>When using WordPress as a CMS, I often repurpose the &#034;posts&#034; as other types of content a site may need. For example, news or press releases, or any information that might need the ability to be catgorized and/or tagged (like testimonials). However, this may mean that you need a completely different template for your news page than you would want for your testimonials page.</p>
<p>WordPress gives you the <a href="http://codex.wordpress.org/Theme_Development">ability</a> to create <a href="http://codex.wordpress.org/Category_Templates">category specific templates</a>. So let&#039;s say your &#034;news&#034; category has an ID of 5 &#8211; if you create a category.php page to be used by all the other categories, and also created a category-5.php page &#8211; then just your news page will use that template for the category archive page.</p>
<p>But &#8211; what if you have a huge handful of subcategories and you want them all to use the same category template as it&#039;s parent? (Let&#039;s also assume that we can&#039;t just make this the default template) Here&#039;s what I came up with. Let&#039;s say that Testimonials is our category &#8211; it has an id of 12. It also has a dozen or so subcategories (for argument&#039;s sake, lets say we&#039;ve sorted our testimonials into groups from what types of companies these testimoinals have come from &#034;Consulting Firms&#034;, &#034;Web Host Providers&#034;, &#034;Design Firms&#034;, etc.</p>
<p>We don&#039;t want to duplicate our category template for every subcategory we have. That&#039;s a nightmare to manage. So lets do this instead: In your category.php template file &#8211; before ANYTHING ELSE &#8211; even before you call get_header() &#8211; we add the following:</p>
<p><code>$thecategory = get_category($cat);<br />
if ($thecategory-&gt;category_parent == '12' || $thecategory-&gt;cat_ID == '12') {<br />
include(TEMPLATEPATH.'/testimonials-template.php');<br />
} else {<br />
/* include... default template file here like we included the "testimonials-template.php - or you can just wrap this around your actual template code... */<br />
}</code></p>
<p>So what this does is it gets information about the category &#8211; if the current category&#039;s PARENT is 12 OR we are in fact looking at category 12 &#8211; then we pull in that special testimonials-template.php file&#8230; Otherwise the other code would be executed. (In the file I was using I just wrapped that around my existing category.php template code&#8230;</p>
<p><strong>Please note:</strong> I have not tested this on if you have a SUB SUB category &#8211; I&#039;m thinking $thecategory-&gt;category_parent probably only looks one level above the current category&#8230; so keep that in mind.</p>
<p>(I make the note above that this does not include a plugin because when I was trying to get this to work &#8211; one solution I had found online involved installing a plugin that kind of messed with my category heirarchy in a way I wasn&#039;t crazy about. Personally, I think this is a much simpler solution)</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Never Update the Copyright Year Again (on a PHP page)</title>
		<link>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:57:55 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1628</guid>
		<description><![CDATA[This is a really silly little trick &#8211; but if you have a PHP page that has a &#169; copyright year at the bottom &#8211; there is no reason you should be updating that every year (unless it&#039;s just something you overlooked initially)   As you get requests from clients now that we&#039;re in [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is a really silly little trick &#8211; but if you have a PHP page that has a &copy; copyright year at the bottom &#8211; there is no reason you should be updating that every year (unless it&#039;s just something you overlooked initially) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  As you get requests from clients now that we&#039;re in a new year to change the copyright year in the footer &#8211; do yourself a favor and use this instead so you never have to do it again. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code>&lt;?php echo date("Y"); ?&gt;</code></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>swfobject &#8211; flash doesn&#039;t load in Firefox</title>
		<link>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 18:17:43 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1627</guid>
		<description><![CDATA[Ran into a bizarre problem today using swfobject. A lot of wasted time, but I&#039;ll give you the short story / solution.
I&#039;m not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a float) [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/03/23/multi-row-carousel-and-image-loader-with-jquery/' rel='bookmark' title='Permanent Link: Multi-Row Carousel and Image Loader with JQuery'>Multi-Row Carousel and Image Loader with JQuery</a> <small>A recent project I&#039;ve been working on involved a portfolio...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Ran into a bizarre problem today using <a href="http://code.google.com/p/swfobject/">swfobject</a>. A lot of wasted time, but I&#039;ll give you the short story / solution.</p>
<p>I&#039;m not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a float) but I had the call to the swfobject javascript in the BODY tags of the html (not within the head tags). This was apparently causing Firefox to not display the flash. Simply moving the swfobject javascript code within the head tags of the html instantly fixed the problem.</p>
<p>I know I&#039;ve used swfobject inside the body before &#8211; so I&#039;m sure there&#039;s something else that contributed to the problem.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/03/23/multi-row-carousel-and-image-loader-with-jquery/' rel='bookmark' title='Permanent Link: Multi-Row Carousel and Image Loader with JQuery'>Multi-Row Carousel and Image Loader with JQuery</a> <small>A recent project I&#039;ve been working on involved a portfolio...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple Featured Content Galleries</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 17:44:40 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1623</guid>
		<description><![CDATA[On a site I was working on recently, the client was using the Featured Content Galleries plugin for their homepage (you can download it from here) &#8211; but they wanted to add a gallery like this to other pages on their website and have other featured content on those pages. This is not a feature [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/' rel='bookmark' title='Permanent Link: Two Blocks of Content for Pages in WordPress'>Two Blocks of Content for Pages in WordPress</a> <small>I just saw this plugin show up on the WordPress...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>On a site I was working on recently, the client was using the <a href="http://www.featuredcontentgallery.com/">Featured Content Galleries</a> plugin for their homepage (<a href="http://wordpress.org/extend/plugins/featured-content-gallery/">you can download it from here</a>) &#8211; but they wanted to add a gallery like this to other pages on their website and have other featured content on those pages. This is not a feature currently supported &#034;out of the box&#034; with this plugin. But hacking it in is pretty easy.</p>
<p>First &#8211; you will need to create a category that you will use for the other Featured Content Galleries &#8211; one per page you want to use it with. Assign posts you want to appear in the featured content gallery with this new category. For example &#8211; lets say on your homepage you&#039;re running the featured content gallery, and it&#039;s showing posts from the &#034;featured-posts&#034; category. But lets say you have a &#034;products&#034; page and on that page, you only want articles related to your products showing up on that page. So you would need to create another category &#8211; lets call it &#034;featured-posts-about-products&#034;. Then assign this new category to your articles about products. (**Make a note of what the category ID is of this new category!)</p>
<p>You will still need to make sure those posts have a custom field with a key of &#034;articleimg&#034; and a value that is the full URL to the image you want in the featured content gallery.</p>
<p>Now we can start hacking at the plugin&#8230;</p>
<p>Open up <strong>gallery.php</strong> (found in the <strong>featured-content-gallery</strong> plugin directory). MAKE A BACKUP OF GALLERY.PHP JUST IN CASE! <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Then, look for this line:</p>
<pre class="brush: php;">query_posts('category_name=' . get_option('gallery-category') . '&amp;showposts=' . get_option('gallery-items'));</pre>
<p>and replace with the following:</p>
<pre class="brush: php;">$categoryToUse = 'category_name=' . get_option('gallery-category');
if (isset($catidforgallery) &amp;&amp; is_numeric($catidforgallery)) {
$categoryToUse = 'cat=' . $catidforgallery;
}
query_posts($categoryToUse . '&amp;showposts=' . get_option('gallery-items'));</pre>
<p>NOW in your theme &#8211; where you have the featured content gallery appearing &#8211; if you want it to pull from that special category, you can do this:</p>
<pre class="brush: php;">&lt;?php
$catidforgallery = 1234;
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
?&gt;</pre>
<p>The above code assumes our category ID is &#034;1234&#034;.</p>
<p>But lets say you&#039;re using this template for a number of different pages, and on each one you want a different content gallery&#8230; Again, set up these new categories, make notes of what their IDs are &#8211; then on each page that&#039;s using this template, to specify what category ID the featured content gallery should use, add a custom field with a key of &#034;category-feature-rotator&#034; and a value of the category ID you want in the gallery.</p>
<p>Modify the theme/template code to this instead:</p>
<pre class="brush: php;">&lt;?php
$category_feature_rotator = get_post_meta($post-&gt;ID, &quot;category-feature-rotator&quot;, true);
$catidforgallery = false;
if (isset($category_feature_rotator) &amp;&amp; $category_feature_rotator != 0) {
$catidforgallery = $category_feature_rotator;
}
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
?&gt;</pre>
<p>That will look for the custom field and use the category ID you put in for that custom field &#8211; and if it&#039;s not there &#8211; then it will just default to the category specified on the Featured Content Gallery options page.</p>
<p>IMPORTANT NOTE: If/when there is an update to the Feature Content Gallery plugin &#8211; upgrading will overwrite these changes. This post was written for version 3.2.0 of the plugin. Hopefully they&#039;ll build this feature in a next release of the plugin. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>UPDATE 11/16/09</strong> <a href="http://ArtisanPhotography.com/">Greg</a> had asked in the comments about being able to do a similar technique with multiple featured content galleries, but being able to specify page IDs. He was able to solve the problem before I could and sent me the solution. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>To use Page IDs in the gallery:</strong> On the page you want to have the gallery displayed on, create a custom field with a key of &#034;pageids&#034; &#8211; and for the value, give a comma seperated list of page ids.</p>
<p>Where I had been pulling the &#034;category-feature-rotator&#034; custom field &#8211; replace that with the following:</p>
<pre class="brush: php;">$pageids = get_post_meta($post-&gt;ID, &quot;pageids&quot;, true);</pre>
<p>Then look for the following line in gallery.php (should be around 24)</p>
<pre class="brush: php;">$arr = split(&quot;,&quot;,get_option('gallery-items-pages'));</pre>
<p>and change it to this:</p>
<pre class="brush: php;">$arr = split(&quot;,&quot;,($pageids));</pre>
<p><em>*Note: I haven&#039;t personally tested the Page ID method &#8211; so if you try it &#8211; please report back how it goes&#8230;</em></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/' rel='bookmark' title='Permanent Link: Two Blocks of Content for Pages in WordPress'>Two Blocks of Content for Pages in WordPress</a> <small>I just saw this plugin show up on the WordPress...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:10:21 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1622</guid>
		<description><![CDATA[Background: For a site I was working on, I was pulling in content from another page onto the homepage. However I wanted to just bring in an excerpt not the whole page. (And actually, a customized excerpt at that &#8211; not a default set character or word limit). I also didn&#039;t want any images brought [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Background: For a site I was working on, I was pulling in content from another page onto the homepage. However I wanted to just bring in an excerpt not the whole page. (And actually, a customized excerpt at that &#8211; not a default set character or word limit). I also didn&#039;t want any images brought in &#8211; I just wanted the text and any associated formatting.</p>
<p>Well, one problem here is that WordPress pages (at least as of this writing &#8211; with WordPress in version 2.8.5) do not have excerpts for pages. Only for posts. The way around this is to use the &lt;!&#45;&#45; more &#45;&#45;&gt; tag where you want your break. So that works fine &#8211; but what about stripping out the images? I&#039;m still working on my reg-ex knowledge, but I found this one from <a href="http://www.webmasterworld.com/forum88/6851.htm">here</a> and it worked for me. So this is what I&#039;m doing when I&#039;m pulling in my page excerpt:</p>
<p><code>&lt;?php<br />
$posts = query_posts('page_id=1234');<br />
if (have_posts()) : while (have_posts()) : the_post();<br />
//this makes the more work...<br />
global $more; $more = 0;<br />
?&gt;<br />
&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;<br />
&lt;?php<br />
$content = get_the_content('');<br />
$content = preg_replace('/&lt;img[^&gt;]+&gt;/is', '', $content);<br />
echo $content;<br />
?&gt;<br />
&lt;p&gt;&lt;a href="&lt;?php the_permalink(1234); ?&gt;"&gt;&lt;img src="/images/more.gif" /&gt;&lt;/a&gt;&lt;/p&gt;<br />
&lt;?php endwhile; endif; ?&gt;</code></p>
<p>*we&#039;re assuming &#034;1234&#034; is the ID of my page in the example above&#8230;</p>
<p>You&#039;ll also notice I manually added my &#034;more&#034; button image&#8230;</p>
<p>To read more about the more tag (and see where I got that global $more; $more = 0; from, you can see the <a href="http://codex.wordpress.org/Customizing_the_Read_More">WordPress codex here on the subject</a>. (Scroll to the very bottom of the page &#8211; to the section title &#034;How to use Read More in Pages&#034;)</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Two Blocks of Content for Pages in WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 01:44:46 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1621</guid>
		<description><![CDATA[I just saw this plugin show up on the WordPress Plugins list. WOW! I haven&#039;t had a chance to use it yet, but can think of a dozen places where I can use this feature!!! Very excited to see it!
Secondary HTML Content &#8211; WordPress Plugin


Related posts:Multiple Featured Content Galleries On a site I was working [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I just saw this plugin show up on the WordPress Plugins list. WOW! I haven&#039;t had a chance to use it yet, but can think of a dozen places where I can use this feature!!! Very excited to see it!</p>
<p><a href="http://wordpress.org/extend/plugins/secondary-html-content/">Secondary HTML Content &#8211; WordPress Plugin</a></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Delink Pages Plugin</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 17:57:57 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1619</guid>
		<description><![CDATA[(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin Version: 1.1.1 &#8211; see changelog at bottom of post)
I have been wanting to do more wordpress plugin development, but it has a somewhat steep learning curve. So I&#039;m testing the waters a bit here. I&#039;ve done some testing with the plugin, but feedback is appreciated. [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/' rel='bookmark' title='Permanent Link: Two Blocks of Content for Pages in WordPress'>Two Blocks of Content for Pages in WordPress</a> <small>I just saw this plugin show up on the WordPress...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin Version: 1.1.1 &#8211; see changelog at bottom of post)</p>
<p>I have been wanting to do more wordpress plugin development, but it has a somewhat steep learning curve. So I&#039;m testing the waters a bit here. I&#039;ve done some testing with the plugin, but feedback is appreciated. For now, if you have problems with the plugin, leave a comment here. PLEASE include contact information (fill out the email field with a valid email address!!), a URL where you have the plugin installed, any errors you&#039;re getting, etc. The more information you give me, the more likely I will able to fix the problem. </p>
<h2>Plugin Description</h2>
<p>This plugin will allow you to specify certain pages to not be linked when wp_list_pages() is used in your theme. You might want to do this if you want a header for a series of subpages, but don&#039;t specifically want that header to be a real &#034;page&#034; or link.</p>
<p>For example &#8211; you have a series of pages like this:</p>
<ul>
<li><a href="#">About Our Company</a>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Management Team</a></li>
</ul>
</li>
<li><a href="#">Our Products</a></li>
<li><a href="#">etc etc etc</a></li>
</ul>
<p>As of version 1.1 of this plugin there are two ways you can go about doing this. You can either remove the link entirely. As in no &lt;a&gt; tag at all like this:</p>
<ul>
<li>About Our Company
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Management Team</a></li>
</ul>
</li>
<li><a href="#">Our Products</a></li>
<li><a href="#">etc etc etc</a></li>
</ul>
<p>OR you can remove the link to the actual page and sawp it out for a blank link to &#034;#&#034;.</p>
<h2>Usage</h2>
<p>To use the plugin, download the zip, and unzip the file. Install it by putting the scripty-delinkpage.php in your wp-content/plugins/ directory. Activate it through the WordPress admin. Then, on pages you do not want to have a link, add a custom field with a key of &#034;delink&#034; and a value of &#034;true&#034; when you want to remove the link completely, or a value of &#034;href&#034; when you want the href value to be &#034;#&#034;.</p>
<h2>Download</h2>
<p>You can download this plugin from wordpress.org plugin directory here: <a href="http://wordpress.org/extend/plugins/delink-pages/">Delink Pages</a></p>
<h2>Changelog</h2>
<p>Version 1.1.1<br />
Minor bug fix to preg_replace</p>
<p>Version 1.1<br />
Added option for delink to have a value of &#034;href&#034; when you want don&#039;t want the link to be removed entirely but be linked to &#034;#&#034;</p>
<p>Version 1.0<br />
Initial release</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/19/two-block-of-content-for-pages/' rel='bookmark' title='Permanent Link: Two Blocks of Content for Pages in WordPress'>Two Blocks of Content for Pages in WordPress</a> <small>I just saw this plugin show up on the WordPress...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Conditionally change path to HTTPS</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/06/conditionally-change-path-to-https/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/06/conditionally-change-path-to-https/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 22:01:25 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1618</guid>
		<description><![CDATA[One of my clients had set it up so that one particular page in their WordPress install would load as https:// and even though they changed all links they could find in their template to use root-relative links, they were still getting complaints from IE about the page loading some secure and non-secure items. A [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One of my clients had set it up so that one particular page in their WordPress install would load as https:// and even though they changed all links they could find in their template to use <a href="http://www.motive.co.nz/glossary/linking.php">root-relative link</a>s, they were still getting complaints from IE about the page loading some secure and non-secure items. A look through the source code revealed that two plugins in particular (an <a href="http://wordpress.org/extend/plugins/events-manager/">event manager plugin</a> and <a href="http://www.deliciousdays.com/cforms-plugin">cforms plugin</a>) pulled in their CSS or javascript files without the https. It probably got these settings from the main WordPress install, which wasn&#039;t set to use ALL https &#8211; the had just set it up so that this one page would be (using a special template for https pages). But there was no way to get that information to the plugin&#8230; So I needed to do a little hacking to the plugin(s) and add in a conditional statement that would check if the page being viewed was https &#8211; and if so, swap out http:// for https:// in the path to the file. </p>
<p>In the case of the cforms plugin, the file I had to modify was cforms.php &#8211; the line I found that pulled in the file path looks like this:</p>
<pre name="code" class="php">$cforms_root = $cformsSettings['global']['cforms_root'];</pre>
<p>So, just below that I added this:</p>
<pre name="code" class="php">if(isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "on") {
$cforms_root = str_replace("http://","https://",$cforms_root);
}</pre>
<p>Pretty simple. Of course, if/when we need to upgrade the plugin, the change will be overwritten &#8211; but it&#039;s pretty easy to add back in&#8230;</p>
<p><a href="http://www.deliciousdays.com/cforms-forum/troubleshooting/https-problems/">(Apparently, I&#039;m not the only one with this issue&#8230;)</a></p>
<p>In the case of the event manager plugin, the file I modified was dbem_events.php:</p>
<p>So just below this:</p>
<pre name="code" class="php">function dbem_general_css() {
$base_url = get_bloginfo('url');</pre>
<p>I added this:</p>
<pre name="code" class="php">if(isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "on") {
$base_url = str_replace("http://","https://",$base_url);
}</pre>
<p>No more complaints from IE.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/06/conditionally-change-path-to-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a block of HTML to a WordPress post</title>
		<link>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 03:10:10 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1617</guid>
		<description><![CDATA[One problem with the WYSIWYG editor in WordPress is that if you are trying to manually add in a block of HTML, the editor may try to translate that block into paragraph format, inserting &#60;p&#62; tags where you didn&#039;t intend, possibly (and most likely) ruining what you were intending to do with your HTML code [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One problem with the WYSIWYG editor in WordPress is that if you are trying to manually add in a block of HTML, the editor may try to translate that block into paragraph format, inserting &lt;p&gt; tags where you didn&#039;t intend, possibly (and most likely) ruining what you were intending to do with your HTML code block.</p>
<p>Previously, my way around this had included the use of various plugins that had you wrap certain areas in your post with specific comments that would tell WordPress to leave that block alone and not insert those paragraph tags. There was still some issues doing it this way &#8211; as it required you to view these posts in the HTML view. Viewing them in the visual editor would mess everything up.</p>
<p>So, keeping in line with what seems to be a current trend at the moment of solving all my problems with shortcodes, that&#039;s how I&#039;ve decided to solve this problem as of late.</p>
<p>First &#8211; (you&#039;ll only need to do this once) &#8211; add the PHP code so that you can do the shortcode. If you don&#039;t already have a functions.php file in your theme directory, create one and add the following code:</p>
<p><code>function scriptysAddHTML_func($atts) {<br />
global $post;<br />
$id = $atts['id'];<br />
if (empty($id)) return;<br />
return get_post_meta($post->ID, $id, true);<br />
}<br />
add_shortcode('html', 'scriptysAddHTML_func');</code></p>
<p>Then, in your post when you want to add some custom HTML, paste your block of HTML into the <strong>value</strong> of a new custom field. For the <strong>name</strong> of this custom field, give it a unique name with no spaces. (For example: My_HTML_Block)</p>
<p>In your WordPress post, where you want this block to appear, add the shortcode like this:</p>
<p><code>&#91;html id=My_HTML_Block]</code></p>
<p>You would add it exactly like the above, except instead of My_HTML_Block, you would change that to be the name you gave your custom field.</p>
<p><strong>Extra Tip</strong> If for some reason, you&#039;re using more than one shortcode in your post and it doesn&#039;t seem like they&#039;re working&#8230; if you&#039;re using them one right after the other, make sure there is a space between them. ie. If you&#039;re using my <a href="http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/">linebreak shortcode</a>, and you were adding more than one linebreak&#8230; it might not work if you do this:</p>
<p><code>[br][br][br]</code></p>
<p>You my have to do this:</p>
<p><code>[br] [br] [br]</code></p>
<p>Little minor thing, but something you might not have thought of&#8230; figured I&#039;d mention it. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.002 seconds -->
