<?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>Swift Themes &#187; How to</title>
	<atom:link href="http://swiftthemes.com/category/wordpress/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://swiftthemes.com</link>
	<description>The fastest loading, premium quality free wordpress themes</description>
	<lastBuildDate>Sat, 19 May 2012 11:09: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>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Fix for 404 error while updating and editing posts</title>
		<link>http://swiftthemes.com/2010/06/wordpress/fix-for-404-error-while-updating-and-editing-posts/</link>
		<comments>http://swiftthemes.com/2010/06/wordpress/fix-for-404-error-while-updating-and-editing-posts/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 05:00:06 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[404 error]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[post update error]]></category>
		<category><![CDATA[WordPress Troubleshooting]]></category>

		<guid isPermaLink="false">http://swiftthemes.com/?p=760</guid>
		<description><![CDATA[<p>Yesterday when I was trying to publish a post it was redirecting me to 404 error page. The problem was with only one particular page and it was some way related to the post content. I was able to save the post when I removed some part of the post. I tried a lot of [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p><a href="http://swiftthemes.com/blog/wp-content/uploads/2010/06/404-error.png"><img class="aligncenter size-full wp-image-762" title="404-error" src="http://swiftthemes.com/blog/wp-content/uploads/2010/06/404-error.png" alt="" width="580" height="387" /></a></p>
<p>Yesterday when I was trying to publish a post it was redirecting me to 404 error page. The problem was with only one particular page and it was some way related to the post content. I was able to save the post when I removed some part of the post. I tried a lot of things like</p>
<ul>
<li>Disabling plugins</li>
<li>Activating the default theme</li>
<li>Updating and reinstalling WordPress</li>
<li>Rewriting htaccess and updating permalinks</li>
</ul>
<p>Nothing helped, some of the threads on this problem referred to <strong>mod_security rules</strong>. The problem was due to the mod security rules. As my post had some strings that directly relate to security issues.  These  obviously triggered some mod_security rules I had to disable mod_security rules temporarily to publish the post.</p>
<p>This is what I added to /<strong>usr/local/apache/conf/modsec2/whitelist.conf</strong>, (location may be different in your case)</p>
<p>[code]</p>
<p>&lt;LocationMatch &quot;/wp-admin/*&quot;&gt;<br />
 SecRuleRemoveById 300015<br />
&lt;/LocationMatch&gt;</p>
<p>[/code]</p>
<p>If don&#8217;t have the permissions to edit mod_security rules, ask your hosting support team to update them for you. You may want to show this post as reference to them.</p>
]]></content:encoded>
			<wfw:commentRss>http://swiftthemes.com/2010/06/wordpress/fix-for-404-error-while-updating-and-editing-posts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A complete guide to integrating wordpress and vBulletin</title>
		<link>http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/</link>
		<comments>http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 06:59:51 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[vBulletin]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[vBulletin 4.0]]></category>

		<guid isPermaLink="false">http://swiftthemes.com/?p=574</guid>
		<description><![CDATA[<p>As your blog grows, you might want to build a community around it. If vBulletin is your choice, this guide is for you. Importing WordPress users to vBulletin 4.0 forum If there are lot of users already registered on your blog, It&#8217;s a good idea to start the forum with those users already registered on the forum. Unfortunately there [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<div id="attachment_580" class="wp-caption aligncenter" style="width: 660px"><a rel="attachment wp-att-580" href="http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/attachment/vbulletin-wordpress-and-bbpress/"><img class="size-full wp-image-580" title="vbulletin-wordpress-and-bbpress" src="http://swiftthemes.com/blog/wp-content/uploads/2010/02/vbulletin-wordpress-and-bbpress.png" alt="Integrating vBulletin with wordpress" width="650" height="173" /></a><p class="wp-caption-text">Integrating vBulletin with WordPress</p></div>
<p>As your blog grows, you might want to build a community around it. If vBulletin is your choice, this guide is for you.</p>
<h1>Importing WordPress users to vBulletin 4.0 forum</h1>
<p>If there are lot of users already registered on your blog, It&#8217;s a good idea to start the forum with those users already registered on the forum. Unfortunately there are no scripts to <strong>import WordPress users to vBulletin.</strong></p>
<p>Luckily for us, impex has scripts to import bbPress and the user table structure for WordPress and bbPress are same. So you can import WordPress telling impex that it is bbPress. It will show you a warning that some tables are not found, you can safely ignore them and continue with the import. All the imported users will be placed under a new group named <strong>Active Imported Users</strong>. Move them to registered users, else they may have problem logging in and posting.</p>
<p><strong>goto admincp-&gt; usergroups-&gt; usergroup manager</strong> and drop the newly created group and they will automatically moved to registered users group.</p>
<div id="attachment_578" class="wp-caption aligncenter" style="width: 592px"><a rel="attachment wp-att-578" href="http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/attachment/import-bbpress-to-wordpress/"><img class="size-full wp-image-578" title="import-bbpress-to-wordpress" src="http://swiftthemes.com/blog/wp-content/uploads/2010/02/import-bbpress-to-wordpress.png" alt="preparing bbPress for import" width="582" height="225" /></a><p class="wp-caption-text">Preparing WordPress for import in disguise.</p></div>
<div id="attachment_579" class="wp-caption aligncenter" style="width: 402px"><a rel="attachment wp-att-579" href="http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/attachment/importin-wordpress-users-to-vbulletin/"><img class="size-full wp-image-579" title="importin-wordpress-users-to-vBulletin" src="http://swiftthemes.com/blog/wp-content/uploads/2010/02/importin-wordpress-users-to-vBulletin.png" alt="importing wordpress users to vbulletin" width="392" height="296" /></a><p class="wp-caption-text">You can ignore the warnings in red and continue with the import.</p></div>
<h1>Bridging wordpress and vBulletin</h1>
<p>There is a mod to bridge wordpress and vBulletin, you can download it <a href="http://www.vbulletin.org/forum/showthread.php?t=205388">here</a>. It has clear documentation on how to use the plugin, read the instructions carefully before you do anything.</p>
<p><strong>If you need help integrating vBulletin with your wordpress installation or convert your bbPress forum to vBulletin you can </strong><a href="http://swiftthemes.com/hire-me/"><strong>hire me</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://swiftthemes.com/2010/02/wordpress/a-complete-guide-to-integrating-wordpress-and-vbulletin/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Ultimate method to add post thumbanils to your wordpress theme</title>
		<link>http://swiftthemes.com/2009/10/wordpress/best-way-to-add-post-thumbanils-to-your-wordpress-theme/</link>
		<comments>http://swiftthemes.com/2009/10/wordpress/best-way-to-add-post-thumbanils-to-your-wordpress-theme/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 17:22:43 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[wordpress how-to]]></category>
		<category><![CDATA[wordpress images]]></category>
		<category><![CDATA[wordpress thumbnails]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://swiftthemes.com/?p=160</guid>
		<description><![CDATA[<p>In this tutorial, I will show you the best method to add post thumbnail feature to your wordpress theme. This is what we are going to do. We will check if there is any image set in custom fields, if yes we display that image. Else we check if there is any image stored in [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<div id="attachment_171" class="wp-caption alignright" style="width: 290px"><a href="http://swiftthemes.com/blog/wp-content/uploads/2009/10/post-image-thumb.png"><img class="size-full wp-image-171" title="post-image-thumb" src="http://swiftthemes.com/blog/wp-content/uploads/2009/10/post-image-thumb.png" alt="Wordpress Hacks" width="280" height="150" /></a><p class="wp-caption-text">Wordpress Hacks</p></div>
<p>In this tutorial, I will show you the best method to add <strong>post thumbnail</strong> feature to your wordpress theme. This is what we are going to do.</p>
<ol>
<li>We will check if there is any image set in <strong>custom fields</strong>, if yes we display that image.</li>
<li>Else we check if there is any image stored in the gallery associated with that post, if found we display that image.</li>
<li>Else we do a <strong>pattern match for image url&#8217;s</strong> over the post content and extract the images used in the post, with this method we will be able to pull out images that are not part of wordpress gallery.</li>
</ol>
<h2>How to create a custom field?</h2>
<p>To do this, simply start making a New Post, and scroll down the page until you see “<strong>Advanced Options</strong>“.  Under this heading, you should see something like, <em>Excerpt, Trackback, and <strong>Custom Fields</strong>.</em></p>
<div id="attachment_163" class="wp-caption aligncenter" style="width: 570px"><a href="http://swiftthemes.com/blog/wp-content/uploads/2009/10/wordpress-custom-fields.png"><img class="size-medium wp-image-163" title="wordpress-custom-fields" src="http://swiftthemes.com/blog/wp-content/uploads/2009/10/wordpress-custom-fields-560x163.png" alt="Adding post thumbnails using wordpress custom fields" width="560" height="163" /></a><p class="wp-caption-text">Adding post thumbnails using wordpress custom fields</p></div>
<p>To add a Custom Field for a Thumbnail, just fill in the <em><strong>Key</strong></em> with “image”.  For the <em><strong>Value</strong></em>, post the full URL of the thumbnail you would like to use.</p>
<p>Click Add Custom Field, and it will apply to that post.</p>
<h2>Adding thumbnail to our post</h2>
<p>Add the following code before<br />
<strong>the_content() / excerpt()</strong></p>
<p></p><pre class="crayon-plain-tag">&amp;lt;?php
 //Getting the image url from custom field
 $img = get_post_meta($post-&amp;gt;;ID, 'image', $single = true);
 /*If the custom field url is empty, then we look for
 images stored in galler associated with the post. If
 there are no images associated with the gallery we
 proceed further and do a pattern matching to identify
 images in the post content.
 */
 if(!$img){
 //Get images attached to the post
 $args = array(
 'post_type' =&amp;gt; 'attachment',
 'post_mime_type' =&amp;gt; 'image',
 'numberposts' =&amp;gt; -1,
 'order' =&amp;gt; 'ASC',
 'post_status' =&amp;gt; null,
 'post_parent' =&amp;gt; $post-&amp;gt;ID);
 $attachments = get_posts($args);
 if ($attachments) {
 foreach ($attachments as $attachment)
 $img = wp_get_attachment_thumb_url( $attachment-&amp;gt;ID );
 }
 else{
 //Extracting the content of the post to do a pattern match
 $content = $post-&amp;gt;post_content;
 //A simple regular expression to identify image urls.
 $searchimages = '~http://[^&amp;gt;]*.(jpg|jpeg|gif|png)~';
 preg_match( $searchimages, $content, $pics );
 $iNumberOfPics = count($pics[0]);
 if ( $iNumberOfPics &amp;gt; 0 )
 $img=$pics[0];
 }
 }
 /*If we get a image url in any of the above steps, we echo the
 following code to display the image. set the height or width
 attribute so that image doesn't break the layout and doesnt look
 distorted.
 */
if($img){?&amp;gt;&amp;lt;img src=&amp;quot;&amp;lt;?php echo $img;$img=NULL; ?&amp;gt;&amp;quot;&nbsp;&nbsp; height=&amp;quot;150&amp;quot;/&amp;gt;&amp;lt;?php }
?&amp;gt;</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://swiftthemes.com/2009/10/wordpress/best-way-to-add-post-thumbanils-to-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 4/11 queries in 0.005 seconds using disk: basic
Object Caching 529/539 objects using disk: basic

Served from: swiftthemes.com @ 2012-05-21 15:07:36 -->
