<?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>Amit Verma &#187; tools</title>
	<atom:link href="http://amit.me/category/internet/tools/feed" rel="self" type="application/rss+xml" />
	<link>http://amit.me</link>
	<description>A walk along technology river</description>
	<lastBuildDate>Tue, 17 Jan 2012 06:50:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Plugin: Assign Categories to Pages &#8211; version 1.1</title>
		<link>http://amit.me/plugin-assign-categories-to-pages-version-1-1/577</link>
		<comments>http://amit.me/plugin-assign-categories-to-pages-version-1-1/577#comments</comments>
		<pubDate>Mon, 12 Apr 2010 16:21:46 +0000</pubDate>
		<dc:creator>Amit Verma</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[map categories to pages]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://amit.me/?p=577</guid>
		<description><![CDATA[This page has been moved to http://wordpressable.me/plugins/map-categories-to-pages I have updated Map Categories to Pages. It has auto-insertion capability now. New Features in version 1.1: Option for auto-insertion of the Pages on Category pages Option for auto-insertion of Posts on the Pages which belong to the same category To enable the features, goto the Map Categories [...]]]></description>
			<content:encoded><![CDATA[<p></p><p class="alert">This page has been moved to <a href="http://wordpressable.me/plugins/map-categories-to-pages">http://wordpressable.me/plugins/map-categories-to-pages</a></p>
<p>I have updated <a href="http://wordpress.org/extend/plugins/map-categories-to-pages/admin/" target="_blank">Map Categories to Pages</a>. It has auto-insertion capability now.</p>
<p>New Features in version 1.1:</p>
<ol>
<li>Option for auto-insertion of the Pages on Category pages</li>
<li>Option for auto-insertion of Posts on the Pages which belong to the same category</li>
</ol>
<p>To enable the features, goto the Map Categories to Pages settings page.</p>
<p style="text-align: center;"><a href="http://amit.me/wp-content/uploads/2010/04/Map-Categories-to-Pages-settings.png"><img class="aligncenter size-full wp-image-578" title="Map-Categories-to-Pages-settings" src="http://amit.me/wp-content/uploads/2010/04/Map-Categories-to-Pages-settings.png" alt="Map Categories to Pages settings page" width="594" height="171" /></a></p>
<p>Choose the appropriate option to enable the features. It also provides the option to specify Header text and style to display just before the posts list on the Pages, e.g. <code>header=Related Posts&amp;before=&lt;h3 class="title"&gt;&amp;after=&lt;/h3&gt;</code>.</p>
<ul>
<li>header &#8211; heading text just before the posts list.</li>
<li>before &#8211; Opening HTML tag (with CSS class or style) to insert just before the post titles</li>
<li>after &#8211; closing HTML tag to insert just after the post titles</li>
</ul>
<p>Read <a href="http://amit.me/assign-categories-to-pages-in-wordpress/545/">Assign Categories to Pages in WordPress</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.me/plugin-assign-categories-to-pages-version-1-1/577/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Assign Categories to Pages in WordPress</title>
		<link>http://amit.me/assign-categories-to-pages-in-wordpress/545</link>
		<comments>http://amit.me/assign-categories-to-pages-in-wordpress/545#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:59:29 +0000</pubDate>
		<dc:creator>Amit Verma</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[map categories to pages]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.amit.me/?p=545</guid>
		<description><![CDATA[This page has been moved to http://wordpressable.me/plugins/map-categories-to-pages WordPress has different options for organizing posts. One of them is Categories. The categories can only be assigned to posts, not to pages in WordPress. But sometime you might want to categorize the pages as well. Here are a few cases. To display related posts on a page. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p class="alert">This page has been moved to <a href="http://wordpressable.me/plugins/map-categories-to-pages">http://wordpressable.me/plugins/map-categories-to-pages</a></p>
<p><a href="http://wordpress.org" target="_blank">WordPress</a> has different options for organizing posts. One of them is <a href="http://codex.wordpress.org/Posts_Categories_SubPanel" target="_blank">Categories</a>. The categories can only be assigned to posts, not to pages in <a href="http://wordpress.org/" target="_blank">WordPress</a>. But sometime you might want to categorize the pages as well. Here are a few cases.</p>
<ol>
<li>To display related posts on a page.</li>
<li>To display pages and categories in navigation menu in mixed order. WordPress provides the two different functions to display a list of  <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages" target="_blank">Pages</a> and <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank">Categories</a>. But it doesn’t give the option to setup a navigation menu mixed with pages and categories, like the example given below. In such a case you can  map pages to categories and use them as category pages. Obviously it  will need some changes in the template.
<ul>
<li> Page 1</li>
<li> Page 2</li>
<li> Category 1</li>
<li> Page 3</li>
<li> Category 2</li>
</ul>
</li>
<li>To display pages on the category pages with the posts.</li>
</ol>
<h3>How to map Categories to pages</h3>
<p>Add following lines of code in the <em>function.php </em>of your theme directory. If you don’t have a function.php in the theme directory then you can add it using any text editor. You can also download the plugin which I have made from <a href="http://wordpress.org/extend/plugins/map-categories-to-pages/" target="_blank">http://wordpress.org/extend/plugins/map-categories-to-pages/</a>.</p>
<pre class="brush: php; title: ; notranslate">
function add_category_box_on_page(){
//add meta box
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'page', 'side', 'low');
}

add_action('admin_menu', 'add_category_box_on_page');
</pre>
<p>It will show the category selection box on the right side on &#8220;Edit Page&#8221; page.</p>
<h3 id="template-changes" name="template-changes">Template changes</h3>
<p>You will also have to edit the <a href="http://codex.wordpress.org/Pages#Page_Templates" target="_blank">page template</a> to use categories. You can use standard category code on your page template. Take a look at <a href="http://codex.wordpress.org/Function_Reference/get_the_category" target="_blank">http://codex.wordpress.org/Function_Reference/get_the_category</a> and <a href="http://codex.wordpress.org/Template_Tags/the_category" target="_blank">http://codex.wordpress.org/Template_Tags/the_category</a>.</p>
<p>Here is a small piece of code to build a page of posts. This example uses the styles from WordPress default theme.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
global $post;
$cats=array();
foreach(get_the_category() as $category) {
	$cats[]=$category-&gt;cat_ID;
}
$showposts = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
   'category__in' =&gt; $cats,
   'showposts' =&gt; $showposts,
   'caller_get_posts' =&gt; $do_not_show_stickies
   );
$my_query = new WP_Query($args);

?&gt;

	&lt;?php if( $my_query-&gt;have_posts() ) : ?&gt;

		&lt;?php while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;
			&lt;?php
			//necessary to show the tags
			global $wp_query;
			$wp_query-&gt;in_the_loop = true;
			?&gt;
			&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
				&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
				&lt;small&gt;&lt;?php the_time('F jS, Y') ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;/small&gt;

				&lt;div class=&quot;entry&quot;&gt;
					&lt;?php the_content('Read the rest of this entry »'); ?&gt;
				&lt;/div&gt;

				&lt;p class=&quot;postmetadata&quot;&gt;&lt;?php the_tags('Tags: ', ', ', '
'); ?&gt; Posted in &lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('Edit', '', ' | '); ?&gt;  &lt;?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?&gt;&lt;/p&gt;
			&lt;/div&gt;

		&lt;?php endwhile; ?&gt;

	&lt;?php else : ?&gt;

		&lt;h2 class=&quot;center&quot;&gt;Not Found&lt;/h2&gt;
		&lt;p class=&quot;center&quot;&gt;Sorry, but you are looking for something that isn't here.&lt;/p&gt;

	&lt;?php endif; ?&gt;
</pre>
<h3>Displaying pages on Category pages</h3>
<p>When WordPress fetches the posts from database, the default post type is &#8216;post&#8217;. So even when you have mapped a page to a category, it won&#8217;t display the page on that category page. The post type needs to be changed explicitly on the category page. To change the post type, add following code in <code>function.php</code>.</p>
<pre class="brush: php; title: ; notranslate">
//call a function just before the query runs to fetch posts
add_action('pre_get_posts','change_post_type');

function change_post_type($var) {
	if(is_category()) {
    	    	$var-&gt;query_vars['post_type'] = 'any';
            	//it will change the value to 'any' from the default value of ;post';
            	//can be any, attachment,  page, post, or revision.
            	//'any' retrieves any type except revisions.
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://amit.me/assign-categories-to-pages-in-wordpress/545/feed</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Bookmark Facebook application</title>
		<link>http://amit.me/bookmark-facebook-application/336</link>
		<comments>http://amit.me/bookmark-facebook-application/336#comments</comments>
		<pubDate>Fri, 10 Oct 2008 12:23:10 +0000</pubDate>
		<dc:creator>Amit Verma</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.amit.me/blog/?p=336</guid>
		<description><![CDATA[I have seen many people complaining about Facebook applications that are not shown in the application menu. When an application is added it doesn’t get displayed in the Facebook Application menu automatically. Only bookmarked applications are shown there. After adding the application follow the steps given below to bookmark. Click on the Edit link on [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have seen many people complaining about Facebook applications that are not shown in the application menu. When an application is added it doesn’t get displayed in the Facebook Application menu automatically. Only bookmarked applications are shown there.</p>
<p>After adding the application follow the steps given below to bookmark.</p>
<ol>
<li>Click on the Edit link on Application menu in the bottom of the browser.<br />
<img title="facebook-application-menu" src="http://www.amit.me/blog/wp-content/uploads/2008/10/facebook-application-menu.png" alt="" width="208" height="313" /></li>
<li>Click on the Edit link against the application you want to bookmark.<br />
<img title="facebookapplication" src="http://www.amit.me/blog/wp-content/uploads/2008/10/facebookapplication.png" alt="" width="450" height="24" /></li>
<li> Select the checkbox from Bookmark tab.<br />
<img title="facebook-editbox" src="http://www.amit.me/blog/wp-content/uploads/2008/10/facebook-editbox.png" alt="" width="467" height="178" /></li>
</ol>
<p>Now you are set to go. The application should display in the Application menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.me/bookmark-facebook-application/336/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

