<?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>Techstroke - Technology Gadgets  Blogging Softwares &#187; Wordpress Hacks</title>
	<atom:link href="http://www.techstroke.com/blogging/wordpress-hacks/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techstroke.com</link>
	<description>Technology News Tips &#38; Tricks Social Media Blogging Wordpress</description>
	<lastBuildDate>Sat, 31 Jul 2010 17:17: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>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress Tricks &amp; Hacks : Removing Admin Name In Comment Class To Add More Security</title>
		<link>http://www.techstroke.com/wordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html</link>
		<comments>http://www.techstroke.com/wordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html#comments</comments>
		<pubDate>Mon, 31 May 2010 13:15:33 +0000</pubDate>
		<dc:creator>alok</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Hacks]]></category>
		<category><![CDATA[Adding More security In wordpress]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[bavotasan]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[Everyone]]></category>
		<category><![CDATA[hole]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[Name]]></category>
		<category><![CDATA[return classes]]></category>
		<category><![CDATA[Secure Wordpress]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[security hole]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[wordpress hacks and tricks]]></category>

		<guid isPermaLink="false">http://www.techstroke.com/wordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html</guid>
		<description><![CDATA[&#160; It is usually happen when blog admin left a comment on his blog,WordPress use the name in the comment css class. This is useful for styling, but it will also let people know about your admin login name and is no more secure. To avoid and hide this information, you can add this code [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.techstroke.com%2Fwordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.techstroke.com%2Fwordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html&amp;source=techstroke&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.techstroke.com/wp-content/uploads/2010/05/image40.png" ><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.techstroke.com/wp-content/uploads/2010/05/image_thumb42.png" width="290" height="232" /></a>&#160;</p>
<p>It is usually happen when blog admin left a comment on his blog,WordPress use the name in the comment css class.</p>
<p>This is useful for styling, but it will also let people know about your admin login name and is no more secure. To avoid and hide this information, you can add this code snippet that can quickly remove the offending class from every comment.</p>
<p>Just add this to your functions.php file:</p>
<p>&#160;</p>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td valign="top" width="500">
<blockquote>
<pre>function remove_comment_author_class( $classes ) {
	foreach( $classes as $key =&gt; $class ) {
		if(<font color="#d20000">strstr</font>($class, <font color="#0000ff">&quot;comment-author-&quot;</font>)) {
			<font color="#ff0000">unset</font>( $classes[$key] );
		}
	}
	return $classes;
}
add_filter( <font color="#0000ff">'comment_class' , 'remove_comment_author_class'</font> );</pre>
</blockquote>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Source : <a href="http://bavotasan.com/tutorials/small-security-hole-in-wordpress-comments/"  target="_blank" rel="nofollow">bavotasan</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techstroke.com/wordpress-tricks-hacks-removing-admin-name-in-comment-class-to-add-more-security.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make Redirects (302 to 301) Permanent?</title>
		<link>http://www.techstroke.com/redirects-302-301permanent.html</link>
		<comments>http://www.techstroke.com/redirects-302-301permanent.html#comments</comments>
		<pubDate>Thu, 27 May 2010 06:34:30 +0000</pubDate>
		<dc:creator>saurabh</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Hacks]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[change 302 redirects to 301 redirects]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[custom domains]]></category>
		<category><![CDATA[domain mapping]]></category>
		<category><![CDATA[error resolving]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[how to change 302 redirects to 301 redirects]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[Permanent Redirect]]></category>
		<category><![CDATA[primary domain]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[Redirect 302]]></category>
		<category><![CDATA[Redirects 301]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[self hosted wordpress]]></category>
		<category><![CDATA[support documents]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://www.techstroke.com/redirects-302-301permanent.html</guid>
		<description><![CDATA[It is possible to make redirect mode permanent active, by setting example.com as your primary domain, all your visitors who try to access your old example.wordpress.com links automatically get redirected to the new domain. While starting WordPress.com, you have to start with a standard WordPress.com domain name for your blog which looks something like this: [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.techstroke.com%2Fredirects-302-301permanent.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.techstroke.com%2Fredirects-302-301permanent.html&amp;source=techstroke&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p align="justify">It is possible to make redirect mode permanent active, by setting example.com as your primary domain, all your visitors who try to access your old example.wordpress.com links automatically get redirected to the new domain.</p>
<p align="justify"><b><a href="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image00221.jpg" ><img title="clip_image002" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="125" alt="clip_image002" src="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image002_thumb11.jpg" width="124" border="0" /></a></b></p>
<p> <span id="more-1482"></span>
<p align="justify">While starting WordPress.com, you have to start with a standard WordPress.com domain name for your blog which looks something like this: &#8211; <strong>example.wordpress.com</strong>. There you can find the option of upgrading to a custom mapped domain such as <strong>example.com</strong>.</p>
<p align="justify"><a href="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image00274.jpg" ><img title="clip_image002[7]" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="161" alt="clip_image002[7]" src="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image0027_thumb4.jpg" width="240" border="0" /></a></p>
<p align="justify">The good news is by setting example.com as your primary domain, all your visitors who try to access your old example.wordpress.com links automatically get redirected to the new domain.</p>
<p align="justify">&#160;</p>
<p><strong>But what about search engines and other services that access the old example.wordpress.com links?</strong></p>
<p align="justify">Up until now, WordPress.com would send those services a 302 redirect which would tell them that a link had a new temporary home, and to go index that new link, but to not forget about the original one.</p>
<p align="justify">Today we have changed 302 redirects to 301 redirects. A 301 redirect tells search engines the new link has moved permanently, and they can discard the old links.</p>
<p align="justify"><a href="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image00293.jpg" ><img title="clip_image002[9]" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="170" alt="clip_image002[9]" src="http://www.techstroke.com/wp-content/uploads/2010/05/clip_image0029_thumb3.jpg" width="240" border="0" /></a></p>
<p><strong>Why does this matter?</strong></p>
<p align="justify">This change should help maintain traffic levels from search engines when changing or upgrading to custom domains, and makes things more flexible for you if you ever want to move from WordPress.com to self-hosted WordPress.</p>
<p align="justify">As with anything search engine related, your mileage may vary, and the timing on when search engines such as Google, Bing, and others update their index is not something anyone can predict. We have a short support document explaining some of the complexities involved with search engines that is worth a read if you have any questions.</p>
<p align="justify">&#160;</p>
<p><b>Helpful Links:</b></p>
<p><a href="http://en.wikipedia.org/wiki/HTTP_302"  rel="nofollow">http://en.wikipedia.org/wiki/HTTP_302</a></p>
<p><a href="http://en.wikipedia.org/wiki/HTTP_301"  rel="nofollow">http://en.wikipedia.org/wiki/HTTP_301</a></p>
<p><a href="http://en.support.wordpress.com/domain-mapping/"  rel="nofollow">http://en.support.wordpress.com/domain-mapping/</a></p>
<p><a href="http://get.wp.com/"  rel="nofollow">http://get.wp.com/</a></p>
<p><a href="http://en.support.wordpress.com/search-engines/"  rel="nofollow">http://en.support.wordpress.com/search-engines/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techstroke.com/redirects-302-301permanent.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Automatically Use Resized Images Instead of Originals Using PHP Script in WordPress</title>
		<link>http://www.techstroke.com/how-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html</link>
		<comments>http://www.techstroke.com/how-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 06:42:45 +0000</pubDate>
		<dc:creator>binesh</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress Hacks]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image metadata]]></category>
		<category><![CDATA[image Resize]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[uploaded image]]></category>
		<category><![CDATA[width image]]></category>

		<guid isPermaLink="false">http://www.techstroke.com/how-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html</guid>
		<description><![CDATA[This script will replace the uploaded image (if bigger than the larger size defined in your settings) by the large image generated by WordPress to save space in your server, and save bandwidth if you link a thumbnail to the original image, like when a lightbox plugin is used. &#160; &#160; &#160; &#160; &#160; Simply [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.techstroke.com%2Fhow-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.techstroke.com%2Fhow-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html&amp;source=techstroke&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.techstroke.com/wp-content/uploads/2010/02/image11.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.techstroke.com/wp-content/uploads/2010/02/image_thumb11.png" width="208" height="208" /></a></p>
<p><em>This script will replace the uploaded image (if bigger than the larger size defined in your settings) by the large image generated by WordPress to save space in your server, and save bandwidth if you link a thumbnail to the original image, like when a lightbox plugin is used.</em></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p> <span id="more-1065"></span>
<p>Simply paste the following code on your <em>functions.php</em> file and save it. No other action is needed!</p>
<pre>function replace_uploaded_image($image_data) {
    // if there is no large image : return
    if (!isset($image_data['sizes']['large'])) return $image_data;

    // paths to the uploaded image and the large image
    $upload_dir = wp_upload_dir();
    $uploaded_image_location = $upload_dir['basedir'] . </pre>
<pre>    '/' .$image_data['file'];
    $large_image_location = $upload_dir['path'] .</pre>
<pre>    '/'.$image_data['sizes']['large']['file'];

    // delete the uploaded image
    unlink($uploaded_image_location);

    // rename the large image
    rename($large_image_location,$uploaded_image_location);

    // update image metadata and return them
    $image_data['width'] = $image_data['sizes']['large']['width'];
    $image_data['height'] = $image_data['sizes']['large']['height'];
    unset($image_data['sizes']['large']);

    return $image_data;
}
add_filter('wp_generate_attachment_metadata','replace_uploaded_image');</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techstroke.com/how-to-automatically-use-resized-images-instead-of-originals-using-php-script-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Split Your WordPress Content Into Two or More Columns</title>
		<link>http://www.techstroke.com/split-your-wordpress-content-into-two-or-more-columns.html</link>
		<comments>http://www.techstroke.com/split-your-wordpress-content-into-two-or-more-columns.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 05:58:13 +0000</pubDate>
		<dc:creator>binesh</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Hacks]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[content themes]]></category>
		<category><![CDATA[php variable]]></category>
		<category><![CDATA[split wordpress content]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[theme folder]]></category>
		<category><![CDATA[two columns]]></category>

		<guid isPermaLink="false">http://www.techstroke.com/split-your-wordpress-content-into-two-or-more-columns.html</guid>
		<description><![CDATA[WordPress is a great CMS, but implementing some features within your theme can require a little lateral thinking. The content for your page or post is usually output by the theme code using a single function call: the_content(args); But what if you need to split the content into two or more blocks? That might be [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.techstroke.com%2Fsplit-your-wordpress-content-into-two-or-more-columns.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.techstroke.com%2Fsplit-your-wordpress-content-into-two-or-more-columns.html&amp;source=techstroke&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.techstroke.com/wp-content/uploads/2010/02/image8.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.techstroke.com/wp-content/uploads/2010/02/image_thumb8.png" width="204" height="204" /></a> </p>
<p>WordPress is a great <acronym>CMS</acronym>, but implementing some features within your theme can require a little lateral thinking. The content for your page or post is usually output by the theme code using a single function call:</p>
</p>
<p><code><font color="#ff0000">the_content(<em>args</em>);</font></code></p>
<p> <span id="more-1061"></span>
<p>But what if you need to split the content into two or more blocks? That might be necessary if your theme requires multiple columns or sections on the page. WordPress provides a <code><font color="#ff0000">get_the_content()</font></code> function to return content as a PHP variable, but how do you determine where the divisions occur? There are a few solutions on the web, but most involve either:</p>
<ol>
<li>Splitting the content at HTML tags such as <code><a href="http://reference.sitepoint.com/html/h2"  rel="nofollow">h2</a></code> headings. Unfortunately, that requires the content author to know a little HTML and it’s not very versatile — you couldn’t allow two headings in one column. </li>
<li>Using a WordPress shortcode. That’s more flexible, but it still puts the onus on the content editor to remember and use the right code. </li>
</ol>
<p>The WordPress <code><font color="#ff0000">&lt;!--more--&gt;</font></code> tag may offer a better solution. It’s normally used to split a long article into two or more pages, but not all themes use that facility and it only works for WordPress posts by default (not pages). Using the <code><font color="#ff0000">&lt;!--more--&gt;</font></code> tag offers several advantages:</p>
<ul>
<li>A “more” toolbar button is available in both the visual and HTML editing pane. </li>
<li>Divisions can be placed anywhere in the content. </li>
<li>It’s easy for non-technical users to understand how the content will be split. </li>
</ul>
<p> <a href="http://www.techstroke.com/wp-content/uploads/2010/02/image9.png" ><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.techstroke.com/wp-content/uploads/2010/02/image_thumb9.png" width="555" height="382" /></a>
<p>To split your content, locate your theme folder (wp-content/themes), edit or create a <strong>functions.php</strong> file and add the following function within a<font color="#ff0000"> &lt;?php … ?&gt;</font> block:</p>
<p><a href="http://www.techstroke.com/wp-content/uploads/2010/02/image10.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.techstroke.com/wp-content/uploads/2010/02/image_thumb10.png" width="559" height="255" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techstroke.com/split-your-wordpress-content-into-two-or-more-columns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
