WP-Plugins
This page has been moved to http://wordpressable.me/plugins/map-categories-to-pages
Map Categories to Pages
Latest Version: 1.2.3
Compatible WordPress Versions: 2.6 to 3.0.3
Updates in version 1.2.3:
1. Bug fixes.
2. Display categories on Edit Pages page.
Updates in version 1.2.2:
1. Do not auto-insert posts if the Page isn’t mapped to any Category. It used to insert all the posts if the Page isn’t mapped to any Category.
Updates in version 1.2.1:
1. Improved compatibility with Menus in WordPress 3. Thanks to Joe
Updates in version 1.2:
1. Compatible with WordPress 3
Updates in version 1.1:
1. Option for auto-insertion of the Pages on Category pages
2. Option for auto-insertion of Posts on the Pages which belong to the same category
Map Categories to Pages displays the category box on the “Edit Page” page. By default, Every page in wordpress is mapped to the default category but this plugin gives the option to select categories for a pages. Read Plugin Update: Assign Categories to Pages – version 1.2, Plugin: Assign Categories to Pages – version 1.1 and Assign Categories to Pages in WordPress for more information.




{ 60 comments }
Hello,
i have install your plugin on my Wordpress, but hot do you restrict your page to a catergoy ?
i have check one cat but nothing change.
can you help me ?
Make sure that you are using the version 1.1. When you are done assigning the pages to categories (just like you do in posts) go to the settings page of the plugins. The settings page provides the options for auto-insertion.
Thank you for the great plugin! It’s so simple but works great! I’ve been looking for something like this, for almost a year. Is there any way to also insert entire category posts into the page, not only the titles?
Hey, glad to know that it helped. Check-out http://amit.me/assign-categories-to-pages-in-wordpress/545 page for inserting full post.
I can’t find anything on that link that helps with inserting full posts.
checkout here http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes
Yeah, i didn’t get that to work.
send me the page.php file from your theme on amit[at]amit[dot]me
Sent the original, so my mess isn’t in there.
I now got this to work. My mistake was not using “defult template” on the pages.
Thanks for the plugin. Its great.
It works when the permanet links are normal, but if i use a permanent link with mod rewrite it doesn´t work. Is there any solution?
Thanks
It works with wordpress permanent links. But it doesn’t change the permanent links for Pages.
Hello,
I’m trying your plugin for a page where I only want posts of the ‘Writing’ category to show up. However, the links to posts in that category that eventually show on the page link only link back to the same page. Any insight?
Thanks a lot
Could you please post the link?
Great plugin. Thanks a lot.
I have been using your awesome yet simple plugin on a bunch of my clients WP installs, thanks for doing it!
Glad to know that it is useful. Happy New Year
Hi there,
This is a really great IDEA for a plugin, but I just wanted to let you know my troubles with it for any future development:
I am running WP 3.0.4
This plugin caused Contact Form 7 and Mingle Forum to no display at all. I tested with Twenty Ten theme and other plugins deactivated, and narrowed the trouble down to this plugin
You can see the site that I am developing here: http://www.ladyboneswebdesign.com/trevor2
“Contact” and “Forum” pages are displayin correctly now that this plugin is turned off. I’d love to have it working though, it’s a great feature to add to WP pages
Thanks for the information. I will check and update the plugin.
Happy New Year
Hi Amit,
I have installed your plugin and it’s great, as I am using WP for a normal biz site and do not want to use posts at all. Only problem is that I don’t know how to make the archive with the page categories, when clicking on the category in the footer widget, it goes to the posts archive, which is, of course, empty.
So, I’d like an archive that lists every page by category.
Any ideas?
Thanks for your help.
Anna
On Map Categories to Pages setting page, enable Show the Pages on Category pages option. It should start displaying Pages on category archive pages.
Excellent, I should have worked that out for myself… it’s been a long day.
Thank you so much for the quick reply.
Have a good one!
The plugin is currently correctly showing posts on the pages with the same category, but only the link to the posts. How do I change it to show the whole post or an excerpt of the post?
Thank you, cool plugin.
Please checkout here http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes
Is there a way to show a summary of posts, in stead of the whole post? The “read more”-option in posts don’t work.
Using the settings on Map Categories to Pages setting page, you can insert Post heading on pages.
Yeah, I want a middle-thing of just the header and a full post.
It would be great. I tried to insert it below “Begin the main body” section in page.php, but the whole site got messed up. Where should I place the given code? IN which file, on which section of the php?
Thanks for Your answer. I have no clue.
My wish is to show on the page not only the title link, but the whole posts of that category.
You should insert it below the mail loop of the page. If you are facing problem doing this, you can send the page.php to me at amit[at]amit[dot]me and I will do it for you.
You are very great! Thanks, I would like to live with this kind offer.
For the sake of learning: could You put a comment line to the section, You have copied the code? Than I could see, where should I find next time the mail loop.
Actually I have given a search on the page php for “mail” but this word wasn’t present there. the word loop is not there either. Maybe “mail” is “main”? “Main loop?” I could find many lines with the word “main.”
You won’t find “Main loop” word in page.php. WordPress uses loops to generate page content. You can read more about loops at http://codex.wordpress.org/The_Loop.
Hello,
I am working on a multisite wordpress installation 3.0.4 and have installed your plugin 1.2.2. It is exactly what I need but when I associate a category with a page it shows up on all the pages. What am I doing wrong or is there a fix for that?
I haven’t tested it on multisite wordpress installation. I will test it and let you know.
Please confirm that you don’t mean Wordpress MU (Multi User)
I do mean multisite.
Hi there. I am using this plugin on a website that’s not live yet, but I have a question related to it. Currently, we are using “Blog” as the static page for all posts and other pages that have the categories of posts go there with no problem. However, I don’t want a page that contains all the posts. Am I missing something that will turn that off?
Do you mean you don’t want post to list on Page? If yes, you might have enabled “Show Posts on the Pages tagged under the same category” on Map categories to Pages settings. Turn that off.
Hello,
I have tried to upload your plugin, which I think the idea is awesome, but I am having trouble getting it to work. I am new to wordpress, so I am sure I made a mistake when I was uploading it, but I was wondering if you could help me? I have the link: http://scissormalldistributors.com/sara-danger/ and the page should display the category “scissors”, but it is not. On the “sara danger” page I checked the “scissors” category box, but the page appears blank. I would greatly appreciate your help, thanks
Sincerely,
Sara
Could access the page because only members can see it.
Is the page appearing blank completely or just the posts related to the category aren’t appearing? To display posts’ headings, enable “Show Posts on the Pages tagged under the same category” on Map categories to Pages settings page.
What I would like to do is to only show the categories associated with a page in the sidebar. What is happening now is that all the categories appear in my sidebar whether they are assigned to the page or not. What do I need to do?
Thank you,
Pat
doesn’t seems to have a straight forward way to do it. So the workaround is to fetch all the categories and then check whether it contains pages or not. I will look for much better way to list categories associated with pages only. Meanwhile you can use following code.
[sourcecode language="php"]
<?php
$categories=get_categories();
foreach($categories as $category) {
$myposts = get_posts(‘numberposts=-1&category=’.$category->cat_ID.’&post_type=page’);
if(count($myposts)==0){
continue;
}
echo ‘<li><a href="’ . get_category_link( $category->term_id ) . ‘" title="’ . sprintf( __( "View all posts in %s" ), $category->name ) . ‘" ‘ . ‘>’ . $category->name.’</a> </li> ‘;
}
?>
</ul>
[/sourcecode]
I love your plugin except for one thing. It removes the ability to use post categories. I installed 1.2.1 and 1.2.2 and with the same results. I even resorted to Batch Cat and other plugins in an attempt to be able to assign both pages and posts to categories with out success.
I would love to use your plugin if you can assist me in getting it to work.
Sincerely,
Robert
It does work for both pages and posts. This plugin adds the ability to categories Pages and categories for Posts are intact. Which wordpress version are you using?
Good Morning Amit, I am using WordPress 3.0.4.
If I deactivate the plugin the post categories return, upon activation they disappear and the page categories are available.
NOTE: I am referring to the editor if that wasn’t clear. When I test for the categories that were assigned to either posts or pages they of course remain.
Thanks for the VERY PROMPT reply!
All The BEST!
-Robert
Categories box is appearing on the editor screen for both page and post. I have attached screenshots here.
Post


Page
This isn’t an issue about whether the plugin is capable of doing both but rather that it does not on our site. It would be far more product for you to assist me in isolating the cause of the problem that prevents it from work on both posts and pages. Without your assistance in isolating said cause I will be unable to resolve the problem.
Sincerely,
-Robert
Please send me the details of your blog/website at amit[at]amit[dot]me and I will look into it.
Good Day Amit,
A most sincere and heartfelt THANK YOU, for your ongoing assistance! Not only do we feel that your support is above and beyond anything we have ever (and we do mean, ever) experienced, but the diligence by which you approach it is truly a breath of fresh air to the “technology” world.
Thank you so very much! We will sing your praises at every opportunity!
Ciao!
Tom and Becky
The American-Italian Blog
“Tom and Becky’s American-Italian Adventure!”
http://www.American-Italian.com
Thanks for the appreciation Tom. Wish you good luck for your newly launched blog.
Happy Blogging!!!
Is there a way to instead of posting just the titles of post on a page, actually display the entire post? Thnx.
Please take a look at http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes.
I’m just gonna put myself out there as a complete dunce, but where exactly do I apply this php code? Is it within the Wordpress interface, or is it external and I have to paste it into a php file via notepad? Thnx again.
Send me the page.php at amit[at]amit[dot]me and I will do it.
So it’s page.php that needs editing? Ok. I’ll do it.
Do you mean header with excerpt?
What I am thinking of is the header (with link), an featured image and some text (length of witch chosen when you use the “read more”-button you use when posting posts).
You will have to use code similar to following.
[php]
<?php
/* List posts from the same category – start */
global $post;
$cats=array();
foreach(get_the_category() as $category) {
$cats[]=$category->cat_ID;
}
$showposts = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
‘category__in’ => $cats,
‘showposts’ => $showposts,
‘caller_get_posts’ => $do_not_show_stickies
);
$my_query = new WP_Query($args);
while ($my_query->have_posts()) : $my_query->the_post();
?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="entry">
<!– if you have featured post in custom keys –>
<?php if ( get_post_meta($post->ID, ‘thumb’, true) ) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img class="thumb" src="<?php echo get_post_meta($post->ID, ‘thumb’, true) ?>" alt="<?php the_title(); ?>" />
</a>
<?php endif; ?>
<?php the_content(‘Read more »’); ?>
</div>
<?php
endwhile;
/* List posts from the same category – end */
?>
[/php]
And should I use the code in post.php, in addition too the other codes you have provided? Or replace them?
The changes will go in page.php (if you want to show posts on pages, which is one of the purposes of the plugin). The code will be replaced.
If you want me to do this, you can send the page.php file to me at amit[at]amit[dot]me.
That gave the title a link, but there is no summary, or read more link.
Please send me the theme files at amit[at]amit[dot]me. I will fix this.
Comments on this entry are closed.