<?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>Matt Thiessen</title>
	<atom:link href="http://matt.thiessen.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://matt.thiessen.us</link>
	<description>Learning to make the hard things easy</description>
	<lastBuildDate>Thu, 17 May 2012 23:56:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Breadcrumbs for Taxonomy for a Custom Post type</title>
		<link>http://matt.thiessen.us/blog/2012/04/30/breadcrumbs-for-taxonomy-for-a-custom-post-type/</link>
		<comments>http://matt.thiessen.us/blog/2012/04/30/breadcrumbs-for-taxonomy-for-a-custom-post-type/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 17:56:34 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=583</guid>
		<description><![CDATA[This is what I came up with to display the category, or rather a custom taxonomy, of a single posttype page of use in a breadcrumb. The taxonomy I used is &#8216;smg-logo-brand&#8217; and the terms slug where &#8216;kcrg&#8217;, &#8216;the-gazette&#8217; and &#8216;sourcemedia.&#8217; I compared the terms associated with the post to that in the URL to [...]]]></description>
			<content:encoded><![CDATA[<p>This is what I came up with to display the category, or rather a custom taxonomy, of a single posttype page of use in a breadcrumb.  The taxonomy I used is &#8216;smg-logo-brand&#8217; and the terms slug where &#8216;kcrg&#8217;, &#8216;the-gazette&#8217; and &#8216;sourcemedia.&#8217;  I compared the terms associated with the post to that in the URL to determine which term belonged in the breadcrumb.</p>
<pre class="brush: php; gutter: true">if (!is_tax() &amp;&amp; get_post_type() == &#039;smg-logo&#039; &amp;&amp; has_term( array( &#039;kcrg&#039;, &#039;the-gazette&#039;, &#039;sourcemedia&#039;, &#039;other&#039; ), &#039;smg-logo-brand&#039; ) ) {
			$terms = get_the_terms( get_the_ID(), &#039;smg-logo-brand&#039; );
			foreach ( $terms as $term ) {
				if ( strpos( $_SERVER[&quot;REQUEST_URI&quot;], $term-&gt;slug ) !== false) {
					$breads[&#039;terms&#039;] = &#039;&lt;a href=&quot;/logos/&#039;. $term-&gt;slug . &#039;/&quot;&gt;&#039; . $term-&gt;name . &#039;&lt;/a&gt;&#039;;
				}
			}
		}</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2012/04/30/breadcrumbs-for-taxonomy-for-a-custom-post-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom post type capabilities</title>
		<link>http://matt.thiessen.us/blog/2012/04/27/custom-post-type-capabilities/</link>
		<comments>http://matt.thiessen.us/blog/2012/04/27/custom-post-type-capabilities/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 18:47:35 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=549</guid>
		<description><![CDATA[$custom_posts_caps = array(&#039;edit_custom_post&#039;, &#039;read_custom_post&#039;, &#039;delete_custom_post&#039;, &#039;edit_custom_posts&#039;, &#039;edit_others_custom_posts&#039;, &#039;publish_custom_posts&#039;, &#039;read_private_custom_posts&#039;); _smg_add_cap(&#039;administrator&#039;, $custom_posts_caps); _smg_add_cap(&#039;editor&#039;, $custom_posts_caps); &#039;capabilities&#039; =&#62; array( &#039;edit_post&#039; =&#62; &#039;edit_custom_post&#039;, &#039;read_post&#039; =&#62; &#039;read_custom_post&#039;, &#039;delete_post&#039; =&#62; &#039;delete_custom_post&#039;, &#039;edit_posts&#039; =&#62; &#039;edit_custom_posts&#039;, &#039;edit_others_posts&#039; =&#62; &#039;edit_others_custom_posts&#039;, &#039;publish_posts&#039; =&#62; &#039;publish_custom_posts&#039;, &#039;read_private_posts&#039; =&#62; &#039;read_private_custom_posts&#039; ),]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; gutter: true">$custom_posts_caps = array(&#039;edit_custom_post&#039;,
&#039;read_custom_post&#039;,
&#039;delete_custom_post&#039;,
&#039;edit_custom_posts&#039;,
&#039;edit_others_custom_posts&#039;,
&#039;publish_custom_posts&#039;,
&#039;read_private_custom_posts&#039;);

_smg_add_cap(&#039;administrator&#039;, $custom_posts_caps);
_smg_add_cap(&#039;editor&#039;, $custom_posts_caps);

&#039;capabilities&#039; =&gt; array(
&#039;edit_post&#039; =&gt; &#039;edit_custom_post&#039;,
&#039;read_post&#039; =&gt; &#039;read_custom_post&#039;,
&#039;delete_post&#039; =&gt; &#039;delete_custom_post&#039;,
&#039;edit_posts&#039; =&gt; &#039;edit_custom_posts&#039;,
&#039;edit_others_posts&#039; =&gt; &#039;edit_others_custom_posts&#039;,
&#039;publish_posts&#039; =&gt; &#039;publish_custom_posts&#039;,
&#039;read_private_posts&#039; =&gt; &#039;read_private_custom_posts&#039;
),</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2012/04/27/custom-post-type-capabilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create and verify a nonce</title>
		<link>http://matt.thiessen.us/blog/2012/02/27/create-and-verify-a-nonce/</link>
		<comments>http://matt.thiessen.us/blog/2012/02/27/create-and-verify-a-nonce/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:57:30 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=543</guid>
		<description><![CDATA[All of this is created in a class // place this in __construct of the class $this-&#62;nonce_name = &#039;name_&#039; . $my_post_type_slug; $this-&#62;nonce_action = &#039;saving_posttype_&#039; . $my_post_type_slug; add_action(&#039;save_post&#039;, &#039;save_my_custom_posttype&#039;, 10); // place this in a meta box echo &#039; &#039;; // your custom save w/ nonce function save_my_custom_posttype($post_id) { if (isset($_POST[ $this-&#62;nonce_name ]) &#38;&#38; wp_verify_nonce( $_POST[ [...]]]></description>
			<content:encoded><![CDATA[<p>All of this is created in a class</p>
<pre class="brush: php; gutter: true">// place this in __construct of the class
$this-&gt;nonce_name = &#039;name_&#039; . $my_post_type_slug;
$this-&gt;nonce_action = &#039;saving_posttype_&#039; . $my_post_type_slug;
add_action(&#039;save_post&#039;, &#039;save_my_custom_posttype&#039;, 10);

// place this in a meta box
echo &#039;
&#039;;

// your custom save w/ nonce
function save_my_custom_posttype($post_id) {

	if (isset($_POST[ $this-&gt;nonce_name ]) &amp;&amp; wp_verify_nonce( $_POST[ $this-&gt;nonce_name ], $this-&gt;nonce_action ) !== false ) {
		// do something
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2012/02/27/create-and-verify-a-nonce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect url to a page after importing posts</title>
		<link>http://matt.thiessen.us/blog/2012/02/24/redirect-url-to-a-page-after-importing-posts/</link>
		<comments>http://matt.thiessen.us/blog/2012/02/24/redirect-url-to-a-page-after-importing-posts/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 16:43:50 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=533</guid>
		<description><![CDATA[After importing posts from one WordPress site to another, you need to set the htaccess file to direct the pages and images. Here&#8217;s what I used: The old site where I exported posts is easterniowasportsandrec.com. I created a new page that will be a section page for these posts at http://thegazette.com/sports/more/. So I need to [...]]]></description>
			<content:encoded><![CDATA[<p>After importing posts from one WordPress site to another, you need to set the htaccess file to direct the pages and images.  Here&#8217;s what I used:</p>
<p>The old site where I exported posts is easterniowasportsandrec.com.  I created a new page that will be a section page for these posts at http://thegazette.com/sports/more/.  So I need to redirect the old homepage, the old stories and the images.  I added these three rules to the htaccess file on easterniowasportsandrec.com.</p>
<p># redirect old homepage to new page<br />
RewriteCond %{HTTP_HOST} ^easterniowasportsandrec.com$ [NC]<br />
RewriteCond %{REQUEST_URI} ^\/$<br />
RewriteRule ^(.*)$ http://thegazette.com/sports/more/ [L,R=301]</p>
<p># redirect files from old site /files/ to new site /wp-content/uploads/<br />
RewriteCond %{HTTP_HOST} ^easterniowasportsandrec.com$ [NC]<br />
RewriteRule ^(.*/)?files/(.*)$ http://thegazette.com/wp-content/uploads/$2 [R=301,L]</p>
<p># redirect every other page to match the post&#8217;s permalink on new site<br />
RewriteCond %{HTTP_HOST} ^easterniowasportsandrec.com$ [NC]<br />
RewriteRule ^(.*)$ http://thegazette.com/$1 [L,R=301]</p>
<p>These are the example redirects:<br />
redirect the homepage to a page<br />
<a href="http://easterniowasportsandrec.com/">http://easterniowasportsandrec.com/</a></p>
<p>redirect an image<br />
<a href="http://easterniowasportsandrec.com/files/2012/01/Iowa-vs.-Norhtwestern131-128x128.jpg">http://easterniowasportsandrec.com/files/2012/01/Iowa-vs.-Norhtwestern131-128&#215;128.jpg</a></p>
<p>redirect a story<br />
<a href="http://easterniowasportsandrec.com/2011/10/16/feels-like-spring-as-kernels-hold-pa-on-field-tryouts/">http://easterniowasportsandrec.com/2011/10/16/feels-like-spring-as-kernels-hold-pa-on-field-tryouts/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2012/02/24/redirect-url-to-a-page-after-importing-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading WordPress 3.3.1 broke Postie plugin</title>
		<link>http://matt.thiessen.us/blog/2012/02/17/upgrading-wordpress-3-3-1-broke-postie-plugin/</link>
		<comments>http://matt.thiessen.us/blog/2012/02/17/upgrading-wordpress-3-3-1-broke-postie-plugin/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 20:07:33 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=530</guid>
		<description><![CDATA[The get_user_by function breaks when calling _fill_user function. I commented out the get_user_by function and it worked fine. http://wordpress.org/support/topic/postie-broken-in-33-_fill_user-problem]]></description>
			<content:encoded><![CDATA[<p>The get_user_by function breaks when calling _fill_user function.  I commented out the get_user_by function and it worked fine.</p>
<p>http://wordpress.org/support/topic/postie-broken-in-33-_fill_user-problem</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2012/02/17/upgrading-wordpress-3-3-1-broke-postie-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding or Removing Profile Fields</title>
		<link>http://matt.thiessen.us/blog/2011/11/22/adding-or-removing-profile-fields/</link>
		<comments>http://matt.thiessen.us/blog/2011/11/22/adding-or-removing-profile-fields/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:04:13 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=517</guid>
		<description><![CDATA[function my_contactmethods( $contactmethods ) { // add $contactmethods['twitter'] = 'Twitter'; $contactmethods['facebook'] = 'Facebook'; $contactmethods['blog'] = 'Blog'; // remove unset($contactmethods['aim']); unset($contactmethods['jabber']); unset($contactmethods['yim']); return $contactmethods; } add_filter('user_contactmethods','my_contactmethods',10,1);]]></description>
			<content:encoded><![CDATA[<pre>

function my_contactmethods( $contactmethods ) {

	// add
	$contactmethods['twitter'] = 'Twitter';
	$contactmethods['facebook'] = 'Facebook';
	$contactmethods['blog'] = 'Blog';

	// remove
	unset($contactmethods['aim']);
	unset($contactmethods['jabber']);
	unset($contactmethods['yim']);

	return $contactmethods;
}
add_filter('user_contactmethods','my_contactmethods',10,1);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2011/11/22/adding-or-removing-profile-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slideshow Gallery not displaying after recent update</title>
		<link>http://matt.thiessen.us/blog/2011/11/21/slideshow-gallery-not-displaying-after-recent-update/</link>
		<comments>http://matt.thiessen.us/blog/2011/11/21/slideshow-gallery-not-displaying-after-recent-update/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 03:14:56 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[slideshow gallery]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=511</guid>
		<description><![CDATA[/* // Inclusion: Einbindung von Slideshow Gallery Pro &#124;&#124; Fritz echo ""; echo do_shortcode('[gpslideshow custom=1 align=right thumbs=off caption=on auto=on]'); echo ""; */ // Inclusion: Slideshow Gallery Standard &#124;&#124; Fritz &#124;&#124; 22/11/2011 echo ""; echo do_shortcode('[slideshow custom=1]'); echo "";]]></description>
			<content:encoded><![CDATA[<pre>
/*
// Inclusion: Einbindung von Slideshow Gallery  Pro || Fritz
echo "<!-- Gallery existiert GPS Start -->";
echo do_shortcode('[gpslideshow custom=1 align=right thumbs=off caption=on auto=on]');
echo "<!-- Gallery existiert GPS Ende -->";
*/

// Inclusion: Slideshow Gallery Standard || Fritz || 22/11/2011
echo "<!-- Gallery existiert Start -->";
echo do_shortcode('[slideshow custom=1]');
echo "<!-- Gallery existiert Ende -->";
</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2011/11/21/slideshow-gallery-not-displaying-after-recent-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a meta_box to all Post Types</title>
		<link>http://matt.thiessen.us/blog/2011/11/21/adding-a-meta_box-to-all-post-types/</link>
		<comments>http://matt.thiessen.us/blog/2011/11/21/adding-a-meta_box-to-all-post-types/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 01:03:00 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=508</guid>
		<description><![CDATA[$post_types = get_post_types( array( '_builtin' => false ), 'objects' ); // Gets all custom types array_push( $post_types, get_post_type_object( 'post' ), get_post_type_object( 'page') ); // Adds back the 'post' and 'page' types while ommitting attachments, revisions, menus, etc. foreach ( $post_types as $type ) { add_meta_box( . . . ); }]]></description>
			<content:encoded><![CDATA[<pre>
$post_types = get_post_types( array( '_builtin' => false ), 'objects' );  // Gets all custom types
       array_push( $post_types, get_post_type_object( 'post' ), get_post_type_object( 'page')  ); // Adds back the 'post' and 'page' types while ommitting attachments, revisions, menus, etc.
       foreach ( $post_types as $type ) {
               add_meta_box( . . . );
       }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2011/11/21/adding-a-meta_box-to-all-post-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-o-Matic breaks WordPress Related Links</title>
		<link>http://matt.thiessen.us/blog/2011/11/08/wp-o-matic-breaks-wordpress-related-links/</link>
		<comments>http://matt.thiessen.us/blog/2011/11/08/wp-o-matic-breaks-wordpress-related-links/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 15:27:09 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp-o-matic]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=491</guid>
		<description><![CDATA[function adminInit() { auth_redirect(); // force display of a certain section $this->section = ($this->setup) ? ((isset($_REQUEST['s']) &#038;&#038; $_REQUEST['s']) ? $_REQUEST['s'] : $this->sections[0]) : 'setup'; // if (isset($_SERVER['HTTP_USER_AGENT']) &#038;&#038; (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) // die('Please switch to Firefox / Safari'); wp_enqueue_script('prototype'); wp_enqueue_script('wpoadmin', $this->tplpath . '/admin.js', array('prototype'), $this->version); if ($this->section == 'list') wp_enqueue_script('listman'); //if ( WPOTools::isAjax() ) [...]]]></description>
			<content:encoded><![CDATA[<pre>function adminInit() {
		auth_redirect();

		// force display of a certain section
		$this->section = ($this->setup) ? ((isset($_REQUEST['s']) &#038;&#038; $_REQUEST['s']) ? $_REQUEST['s'] : $this->sections[0]) : 'setup';

//    if (isset($_SERVER['HTTP_USER_AGENT']) &#038;&#038; (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
//      die('Please switch to Firefox / Safari');

		wp_enqueue_script('prototype');
		wp_enqueue_script('wpoadmin', $this->tplpath . '/admin.js', array('prototype'), $this->version);

		if ($this->section == 'list')
			wp_enqueue_script('listman');

		//if ( WPOTools::isAjax() ) {
		if ( WPOTools::isAjax() &#038;&#038;  $this->section != 'home' ) { // Matt Thiessen 11/8/11
			$this->admin();
			exit;
		}
	}</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2011/11/08/wp-o-matic-breaks-wordpress-related-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NextGen Gallery fails to create new gallery</title>
		<link>http://matt.thiessen.us/blog/2011/10/12/nextgen-gallery-fails-to-create-new-gallery/</link>
		<comments>http://matt.thiessen.us/blog/2011/10/12/nextgen-gallery-fails-to-create-new-gallery/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:23:26 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=488</guid>
		<description><![CDATA[For some reason the slug field was missing in the wp_6_ngg_gallery on one of my WordPress multisite blogs. The fix . . . ALTER TABLE `wp_6_ngg_gallery` ADD `slug` VARCHAR( 255 ) NULL AFTER `name`; ALTER TABLE `wp_6_ngg_pictures` ADD `image_slug` VARCHAR NOT NULL AFTER `pid`]]></description>
			<content:encoded><![CDATA[<p>For some reason the slug field was missing in the wp_6_ngg_gallery on one of my WordPress multisite blogs.</p>
<p>The fix . . .</p>
<pre>ALTER TABLE `wp_6_ngg_gallery` ADD `slug` VARCHAR( 255 ) NULL AFTER `name`;</pre>
<pre>ALTER TABLE `wp_6_ngg_pictures` ADD `image_slug` VARCHAR NOT NULL AFTER `pid`</pre>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/blog/2011/10/12/nextgen-gallery-fails-to-create-new-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

