<?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 &#187; WordPress</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 13:58:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started</title>
		<link>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 21:40:08 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1640</guid>
		<description><![CDATA[One feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it. First, [...]


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/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/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>
</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 feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it.</p>
<p>First, if your theme doesn&#039;t already have a functions.php file, go ahead and create one. Then add the following PHP code:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav'<br />
	) );</code></p>
<p>&#034;mainnav&#034; (which is the menu&#039;s &#034;slug&#034; and shown as &#034;Main Nav&#034; in the admin) is just what I came up with &#8211; but you can name it whatever you want, and you can have multiple nav menus if you want. Just register them all in that functions file. Here&#039;s an example with 3 nav menus:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav',<br />
		'navtwo' => 'Nav Bar Two',<br />
'navthree' => 'Nav Bar Three',<br />
	) );</code></p>
<p>That&#039;s it &#8211; What that does is tell your theme you&#039;re going to have three different/unique menus. You can use them as many times as you want, wherever you want in your theme.</p>
<p>You&#039;ll create your menus in the WordPress admin &#8211; this is pretty self explanatory (<a href="http://codex.wordpress.org/Appearance_Menus_SubPanel">and described pretty well here</a>) &#8211; add pages, categories, custom links that point outside your blog, whatever you want. Give the menu a name and &#034;apply&#034; it to a location:</p>
<p><img src="http://www.scriptygoddess.com/wp-content/uploads/2010/06/Screen-shot-2010-06-23-at-Jun-23-3.27.27-PM.png" alt="" title="Screen shot 2010-06-23 at Jun 23  3.27.27 PM" width="296" height="309" class="aligncenter size-full wp-image-1641" /></p>
<p>Now &#8211; to add it to your theme&#8230; You get a whole bunch of options so if you need the menu to display one way in one location, and a different way in another location &#8211; you can do that! </p>
<p>Here&#039;s a simple example where I&#039;ve stripped out the nav &#034;wrapper&#034; and any automatic styling it would add &#8211; just drop this in your theme file where you want the menu to show up (like your header.php, or footer.php&#8230; wherever)</p>
<p><code>$args =  array( 'menu' => 'mainnav', 'container' => false, 'menu_id' => false, 'menu_class' => false);<br />
wp_nav_menu($args);</code></p>
<p>But you can insert an ID or a class. <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">This is detailed pretty well here.</a></p>
<p>I&#039;ve already started to use this and it&#039;s great. Clients have been really happy that they can now manage their own menus without requiring edits to a template.</p>
<p><strong>Updated to add:</strong> As pointed out by Stephen in the comments &#8211; if you are creating themes for general public use and you&#039;re not sure what version of WordPress your userbase will be running &#8211; you will want to wrap these new functions in a &#034;<em>if (function_exists(&#039;new-fancy-function-name-here&#039;)) { &#8230; }</em>&#034;. <a href="http://www.scratch99.com/2010/06/practical-theme-support-for-wordpress-3-0-menus/">He has details on this on his site here.</a> In there, he linked to another article that would have helped me out a lot had Google liked the page more so I could have found it when I was working on this recently &#8211; but there&#039;s some <a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus">additional reading here on how to set all this up</a> (it&#039;s a lot more in depth than I got into &#8211; I guess my version is the &#034;Cliff Notes&#034;) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.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/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/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>
</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/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Blogger to WordPress move from hell!</title>
		<link>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/#comments</comments>
		<pubDate>Sat, 22 May 2010 03:08:13 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1638</guid>
		<description><![CDATA[One of the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over [...]


Related posts:<ol><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>
<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 the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over the comments.</p>
<p>I found <a href="http://artlung.com/blog/2010/03/02/migrating-an-old-blogger-blog-to-wordpress/">this post on ArtLung: Migrating an old Blogger Blog To WordPress</a> &#8211; which was a HUGE help. The gist of that was you need to download an export file from Blogger, then <a href="http://code.google.com/p/google-blog-converters-appengine/downloads/list">get this script</a> you run from the terminal (on Mac) which will convert the Blogger xml into a xml that WordPress will understand. (Just to give you an idea what we&#039;re talking about &#8211; the Blogger XML file I downloaded was over 40MB.)</p>
<p>THEN the fun began. After the conversion to WordPress XML &#8211; the file was still about 30MB. This meant that I had to run the import over a dozen times before it could chew through the whole file. When the import times out and you run it again, it recognizes that some posts are already there, so it doesn&#039;t import them a second time &#8211; but for some reason, it seemed to have trouble with a bunch of comments. <em>Some</em> of the comments DID get imported more than once. As well &#8211; the comment counts for each post weren&#039;t getting updated. SO! Here&#039;s the fix I pieced together for those issues.</p>
<p>First, to remove the duplicate comments &#8211; in PHPMyAdmin &#8211; I ran the following SQL command: (*DISCLAIMER: make sure you backup your database before attempting any of this!!)</p>
<p><code>CREATE TABLE temp_table AS SELECT * FROM wp_comments WHERE 1 GROUP BY `comment_post_ID`,`comment_content`,`comment_date`;</code></p>
<p>What that does is create a duplicate of the wp_comments table &#8211; but it&#039;s only grabbing the unique entries. If a comment is posted to the same post, has the same content and the same date &#8211; we&#039;ll just be grabbing one of those and ignoring the rest.</p>
<p><strong>UPDATED TO ADD:</strong> One important thing I need to add in here is that you need to set the primary keys and a few indexes for this new table &#8211; This is the structure of a normal wp_comments table:</p>
<p><code>CREATE TABLE `wp_comments` (<br />
  `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,<br />
  `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `comment_author` tinytext NOT NULL,<br />
  `comment_author_email` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_author_url` varchar(200) NOT NULL DEFAULT '',<br />
  `comment_author_IP` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_content` text NOT NULL,<br />
  `comment_karma` int(11) NOT NULL DEFAULT '0',<br />
  `comment_approved` varchar(20) NOT NULL DEFAULT '1',<br />
  `comment_agent` varchar(255) NOT NULL DEFAULT '',<br />
  `comment_type` varchar(20) NOT NULL DEFAULT '',<br />
  `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  PRIMARY KEY (`comment_ID`),<br />
  KEY `comment_approved` (`comment_approved`),<br />
  KEY `comment_post_ID` (`comment_post_ID`),<br />
  KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),<br />
  KEY `comment_date_gmt` (`comment_date_gmt`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;</code></p>
<p>THEN, I ran this SQL command;</p>
<p><code>DROP TABLE wp_comments;<br />
RENAME TABLE temp_table TO wp_comments;</code></p>
<p>What that does is delete the wp_comments table, then we rename our new and improved &#034;temp_table&#034; so that it is now the official wp_comments table.</p>
<p>NEXT &#8211; we want to update the comment counts. To save having to recount the comments each time &#8211; there is a field in the wp_posts table that stores the total number of comments. However, with the way this import worked, those numbers did not get updated so most were saying there were 0 comments on posts that did have comments. To fix that issue I ran the following SQL command: (which I found <a href="http://planet.mysql.com/entry/?id=23970">here on Planet MySQL</a>)</p>
<p><code>UPDATE wp_posts wpp<br />
LEFT JOIN<br />
(SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments<br />
 WHERE comment_approved = 1 GROUP BY comment_post_id) wpc<br />
ON wpp.id=wpc.c_post_id<br />
SET wpp.comment_count=wpc.cnt<br />
WHERE wpp.post_type IN ('post', 'page')<br />
AND (wpp.comment_count!=wpc.cnt OR (wpp.comment_count != 0 AND wpc.cnt IS NULL));</code></p>
<p>Which as far as I can tell gets the comment counts for each post in wp_posts. (I can&#039;t tell you more than that because once you start getting into the &#034;LEFT JOIN&#034; stuff in sql, my brain shuts off)</p>
<p>The other piece advice I&#039;ll give is if you have a ginormous blog that you have to move like the one I was working with &#8211; set the blog up locally using <a href="http://www.mamp.info/en/index.html">MAMP</a>, do the imports, all the database correcting stuff &#8211; then just export the database and import it onto your server. The database file ended up only being 14MB uncompressed &#8211; way better than trying to chew through a 30MB import file. Once the database is up on your server, <a href="http://www.scriptygoddess.com/archives/2008/06/14/moving-a-wordpress-install/">a few more SQL commands (just like if you&#039;re moving your blog to a new domain)</a> to change the local version (probably http://localhost:8888 ) to your actual domain name, and you&#039;re done!</p>
<p><strong>Another tidbit to add:</strong> if you need to redirect blogger formatted url (that may include &#034;.html&#034; in the end) &#8211; add this to your htaccess file and it should redirect to the new (non extension ending) URL:</p>
<p><code>RewriteEngine On<br />
RewriteRule (.*)\.html $1 [R=301,L] </code></p>
<p>(I tooke off the first line and put the second line under the &#034;RewriteEngine On&#034; that WordPress has in it&#039;s htaccess block and it worked great)</p>


<p>Related posts:<ol><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>
<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/2010/05/21/the-blogger-to-wordpress-move-from-hell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Really awesome membership plugin for WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2010/04/07/really-awesome-membership-plugin-for-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/04/07/really-awesome-membership-plugin-for-wordpress/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:37:53 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1635</guid>
		<description><![CDATA[A project I was working on recently required the use of a membership plugin. I had done some research on membership plugins awhile back and remembered only finding ones that were pretty pricey. One last ditch effort searching through the plugin repository on WordPress.org &#8211; I found one that I hadn&#039;t remembered seeing before: S2Member. [...]


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/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/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>
</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>A project I was working on recently required the use of a membership plugin. I had done some research on membership plugins awhile back and remembered only finding ones that were pretty pricey. One last ditch effort searching through the plugin repository on WordPress.org &#8211; I found one that I hadn&#039;t remembered seeing before: <a href="http://www.primothemes.com/post/s2member-membership-plugin-with-paypal/">S2Member</a>. This plugin really is packed with features and gives the others a run for their money. If you are in the market for a membership plugin &#8211; definitely give this one a try first. (And if you&#039;re happy with it, make sure you contribute to it&#039;s development. If we all chip in, we all benefit!) (<a href="http://wordpress.org/extend/plugins/s2member/">Here&#039;s the download page on wordpress.org</a>)</p>
<p>Here&#039;s the plugin description taken from the download page:</p>
<p><em>s2Member is a full-featured membership management system for WordPress®. It provides a very tight integration with PayPal® Subscriptions, and fully supports recurring billing with the ability to track affiliate commissions on a recurring basis. s2Member supports up to 4 different levels of membership with custom labels. It supports custom Pages for signup, account access, and many others. It also supports the ability to protect certain Pages, certain Posts, certain Categories/Tags, certain parts of content, and even includes advanced documentation on how to utilize the PHP runtime constants provided by the s2Member API. s2Member also supports protected file downloads with limitations on the how many files each user ( or each level ) can download in a given period of time.</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/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/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>
</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/04/07/really-awesome-membership-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<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 [...]


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>4</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/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>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/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/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/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>
<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>
</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/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>
<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>
</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:Delink Pages Plugin (Plugin and this post last [...]


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/06/conditionally-change-path-to-https/' rel='bookmark' title='Permanent Link: Conditionally change path to HTTPS'>Conditionally change path to HTTPS</a> <small>One of my clients had set it up so that...</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>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/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/06/conditionally-change-path-to-https/' rel='bookmark' title='Permanent Link: Conditionally change path to HTTPS'>Conditionally change path to HTTPS</a> <small>One of my clients had set it up so that...</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/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 [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/06/conditionally-change-path-to-https/' rel='bookmark' title='Permanent Link: Conditionally change path to HTTPS'>Conditionally change path to HTTPS</a> <small>One of my clients had set it up so that...</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>
</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/06/conditionally-change-path-to-https/' rel='bookmark' title='Permanent Link: Conditionally change path to HTTPS'>Conditionally change path to HTTPS</a> <small>One of my clients had set it up so that...</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>
</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>19</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 [...]


No related posts.

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>No related posts.</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>
	</channel>
</rss>

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