Map Categories to Pages

This website has moved to http://amit.me/wp-plugins

Latest Version: 1.3

Compatible WordPress Versions: 2.6 to 3.1

Download from WordPress

Updates in version 1.3:

  1. Widget to display pages from the Page’s category.

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.

See old comments at http://amit.me/wp-plugins, http://amit.me/plugin-update-assign-categories-to-pages-version-1-2/596 and http://amit.me/assign-categories-to-pages-in-wordpress/545

This website has moved to http://amit.me/wp-plugins

{ 96 comments }

Rowan March 2, 2011 at 1:28 pm

Hia i absolutely love your plugin! it works Great and fairly easy to use.
was just wondering if i could get your help with editing it a little.
i know you already have a guide for editing page.php to insert full post description content onto the page and that works great. but I’m looking to edit the map-categories-to-page.php file in the plugin folder so that i can tick the box in settings and it displays all the content rather then just the title, and without having to edit page.php
does this make sense? its just when i do it, the styling is a little mucked up just not sure why?
would save me time editing the template if wen i install the plugin it already does this.
thanks.

Amit Verma March 2, 2011 at 1:35 pm

I have already tried it but most of the time it throws memory error when displaying all the fields from Plugin or function.php.

Rowan March 3, 2011 at 7:17 am

why is that? to many posts under the same category?
i just want something simple for example

orignal =
$content.=’ ‘.$before.get_the_title().$after;

my edit =
$content.=’ ‘.$before.get_the_title().get_the_content(‘Read the rest of this entry »’).’

‘.$after;

which works but makes the styling of text different. something to do with post_class() or get_post_class(), sorry new to wordpress.

Amit Verma March 3, 2011 at 11:39 am

Could you please leave the link to the page?

Rowan March 3, 2011 at 7:26 am

My other issue is that when editing the template page.php
the posts show on every page I don’t assign a category too, is there a way around this? as i dont want to give every page a different category.

Amit Verma March 3, 2011 at 8:47 am

This was happening in a previous version. Shouldn’t happen now. Which version are you using? Could you please post the URL of your website?

Rowan March 4, 2011 at 1:23 am

Version 3.1 . Its just a testing site I’m working on locally with xampp same with the comment above, I could email you? otherwise no worries I’ll just work around it.
thank you for your quick replys.

Amit Verma March 4, 2011 at 3:23 am

I mean the plugin’s version. Yes, please email it to me at amit[at]wordpressable[dot]me.

itamar March 4, 2011 at 5:11 pm

how to show the beggining of every post and not just the links?
thanks

Hayley April 8, 2011 at 8:36 am

I’d love to know this too. I’ve had a look at http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes but cannot make head nor tail of it. Step by step instructions would be much appreciated.

Ben March 23, 2012 at 8:33 pm

step by step would make this so much easier

itamar March 4, 2011 at 5:12 pm

i use twentyten theme

Amit Verma March 5, 2011 at 5:30 pm

Sorry for the late reply. I will send you the updated file soon.

Rowan March 12, 2011 at 12:12 am

Posts are not showing on pages unless logged in, do you know why this might be? and how i could fix it?

Amit Verma March 13, 2011 at 3:23 pm

If I am right, you had made changes to the plugin file. Could you send the updated file to me?

winnetou March 23, 2011 at 1:21 am

Hello!

Great plugin, great job! It’s something I was looking for.
But I’ve got some question/request if You mind.
I’m not a PHP coder so forgive me my lame questions. I’m using WP 3.1, Map Categories to Pages v 1.3 and Simpledark Theme and I have no idea how to display part of post on category page (e.g Tech–>Artykuły on my website). It’s only dispalying post titles/headers. Could You give me, please, some advice which file form template modify to display part of post ?

Is it possible to add, in next version, option defining default displaying/behaviour of posts? It would be totally awesome feature.

Sorry for my poor english. Greetings from Poland

Best regards
winnetou

Amit Verma March 23, 2011 at 3:50 am

Glad you find it useful.

You can find more information on template editing at http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes.

I had tried to add that feature in the plugin but on most the wordpress installation it gave memory error.

Let me know if you need further help or you want me to edit the template.

Stacey March 26, 2011 at 11:35 pm

Hi Amit – I’m so excited about this plugin. Unfortunately I’m not much of a .php wiz so I don’t know where I to add the code to page.php. My end goal is to have a few pages with an intro paragraph or two and all of the posts associated for that particular topic listed below. I’d like for there to be a few lines of the post to appear with a link to the full post. Please help!?!

Thanks!

Stacey March 27, 2011 at 10:18 pm

Hi Amit – I’ve gotten the post to appear, but I can’t figure out how to display the blog exerpt and I need some guidance on making the style consistent with my template.

Amit Verma March 28, 2011 at 6:53 am

Please refer http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes for template changes. If you still face problem, send me the files at amit[at]amit[dot]me.

Mike March 27, 2011 at 3:15 pm

Hi,
I am trying your plugin – it seems to be what I am looking for.

What I would like it to do is this:

1) keep any of the “page” edits I put in at the top – as a static part of the page
2) take the posts I categorize for that page and place them below the static part in its entirety.

Can you help me with the coding for this please?

I am using the latest version of WP

Let me know how much I should donate to your cause for your help.

thanks,
Mike

Amit Verma March 28, 2011 at 7:20 am

Sure Mike, could you explain the point 1 a bit more? You can send me the details and theme files on amit[at]amit[dot]me.

Eelco March 31, 2011 at 10:27 am

Hello Amit!

Thanks for this pugin!
I want to use it to list customfields from post and pages with the category ‘slideshow’.
Now im using this code:

<a href="”>ID, ‘titel’, $single = true); if($titel!== ”) echo $titel;} ?>
ID, ‘tekst’, $single = true); if($tekst!== ”) echo $tekst;} ?>

The problem is that only the posts with the category ‘slideshow’ are listed. Can you help me with this?

Thanks..

Eelco

Amit Verma March 31, 2011 at 10:53 am

Sure Eelco, Could you please post the whole code you are using to achieve this? Want to know how you are querying posts.

Eelco March 31, 2011 at 12:17 pm

Hello Amit,

Sorry I made a mistake, here it is:

query_posts(‘category_name=slideshow&showposts=10′);
while (have_posts()) : the_post();
a href=”php the_permalink() “>php { $titel= get_post_meta ($post->ID, ‘titel’, $single = true); if($titel!== ”) echo $titel;}
php { $tekst= get_post_meta ($post->ID, ‘tekst’, $single = true); if($tekst!== ”) echo $tekst;}
php endwhile;
wp_reset_query();

Amit Verma March 31, 2011 at 5:40 pm

This code will show posts from the category “slideshow” because you are querying post from this category only.

Could you please tell me more about what output are you intending?

Rajinder April 8, 2011 at 5:59 am

hi
I have installed Map Categories to Pages. it is working fine. But it display only link of posts in page. Please guide me how to display full post like Post title, post content etc in page.

Thanks

Amit Verma April 8, 2011 at 6:02 am
Rajinder April 8, 2011 at 6:53 am

Thanks Amit
it working now.

Juvenaly Martinka April 10, 2011 at 5:24 am

Greetings,

I am having issues with your plugin. I have installed it and have used it until the other day when Wordpress was upgraded. Now everytime I try and search through my pages using the Category search on the Pages section of the backend of my WP installation.

This is the error I get:

Warning: Illegal offset type in isset or empty in /home/abc123/public_html/wordpress/wp-includes/post.php on line 811

See attachment for screenshot of the error.

Also, once that error comes up, once I try and go to a different category on the same screen I get a white screen with this error:

Invalid post type

Any help you can offer to rectify this issue would be greatly appreciated. It does not seem to affect the website itself so I will keep working on the site for my client until I hear from you. Thank you very much!

In Christ,
Juvenaly Martinka

Amit Verma April 29, 2011 at 3:41 pm

Could you please post the link of the problem site?

Jack June 16, 2011 at 1:25 pm

Hi, Amit – I installed the plugin, made template changes, and the posts are showing appropriately. The only issue is that the actual Page link (with the date underneath) is showing at the top of the list of posts. Is there any way to get this to not show up? I’d like only the static title of the page at the top, followed by the list of actual posts.

Thank you for writing such a helpful plugin!

All the best,
-
Jack

Amit Verma June 16, 2011 at 4:52 pm

If I am not mistaken, you want to remove the page title. If so, you will have to remove some code from the page template. The code should look similar to following. I have taken this example from the Wordpress default theme twentyten.

[php]
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0′ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
[/php]

Will Lanni July 6, 2011 at 1:54 am

Amit — Thanks so much for this. Very awesome.

Amit Verma July 6, 2011 at 3:58 am

Glad you liked it

Greg July 6, 2011 at 10:50 pm

Hi Amit,
I’m having some trouble implementing Categories-to-Pages plugin on a live site. Works fine on my test site, but I can’t tell for the life of me why it’s not working on the live one.
It’s been many months since I setup the test site, so it’s probably something I forgot to replicate on the live version (the test site could not be directly synced with the live one which is why I’m manually rebuilding). Anyway, here’s what’s happening:. I’m using Tweet Import to bring in some Twitter posts. Those are being mapped to a specific categories and through your plugin to a specific page. All is fine and dandy until you click on the page and select one of the posts. When you do that you get a “Not Found” error. The posts show and view find on the homepage and on the category view, just not as pages. Any ideas?

Greg July 6, 2011 at 11:36 pm

Hi again. Call off the hounds! I figured it out. Just a simple screw-up with my permalink settings. It was right in front of me but I didn’t see it.

Follow-up question: To display more than just the post title on a page, is it still necessary to edit the template? http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes)

Amit Verma July 7, 2011 at 2:02 am

Yeah, you will have to make the template changes.

Ria July 31, 2011 at 12:06 am

Hi Amit:

I have high hopes for integrating your plugin into my website, but I’m afraid my php isn’t good enough to finish the job.

Essentially, I can’t figure out how to have a specific page list the full content of posts of a particular category:

a) not just a link to the post, but the full post
b) without messing up all the other pages on my website.

I’d like to do this on several pages (i.e. have a ‘fruit’ page that lists all my ‘fruit’ posts and have a ‘vegetable’ page that lists all my ‘vegetable’ posts).

Any help you can give me would be gratefully received.

Thank you:

Ria

Amit Verma July 31, 2011 at 7:06 am

There is a tutorial at http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes.

If you want me to this then please contact me at amit@amit.me.

SiteSubscribe August 16, 2011 at 12:00 am

Is there any way to Map Categories to Custom Post Types?

I’d like to map existing Categories to Custom Post Types so the CPT can be viewed using Archives, and various sliders and Category widgets. Any suggestions?

Thanks,
Jeff

Amit Verma August 16, 2011 at 6:33 am

I think you will have to enable Custom Post type to use categories. It should do the trick.

Dan Pouliot September 2, 2011 at 4:20 pm

I’m excited about this plug-in but I’m having trouble with a very simple implementation (I am somewhat new to WordPress). In my page.php file I have added some test code:
echo ‘CATID: ‘ . get_query_var(‘cat’);
I have assigned categories to my page, but when I view the page the variable comes back empty. I

Amit Verma September 2, 2011 at 5:15 pm

The Pages don’t have “cat” parameter in query string. You will have to fetch the category from global $post variable.

Use following code to print categories:
global $post;
foreach(get_the_category() as $category) {
echo $category->cat_ID;
}

Dan Pouliot September 6, 2011 at 4:57 pm

That worked, thanks!

Steeve September 4, 2011 at 2:31 am

Hello AMit,

You plugin is great! I just need some clarification on how to modify the the page.php file to get the full posts to show. Do I replace what’s there? I am using the twenty eleven theme v 1.2

Thanks in advance for your help,

Steeve

Amit Verma September 4, 2011 at 1:35 pm

I have customized and uploaded content-page.php at http://wordpressable.me/wp-content/uploads/2011/09/content-page.php-twentyeleven.zip. You might want to tweak the CSS or placement of the code.

The custom code is surrounded by “List posts from the same categories” comment. Don’t forget to take the backup before you replace the file.

Steeve September 5, 2011 at 8:33 pm

Amit,

Thanks for the help. One last thing, the images from the posts are not showing is it possible to have them there?

Thanks again,

Steeve

Steeve September 5, 2011 at 8:41 pm

Oh yeah, can I also remove the list of posts from the page without losing other content lika a calendar?

Gracias,

Steeve

Steeve September 5, 2011 at 10:10 pm

Fixed the list of posts, it was being caused by the sharethis plugin. Still interested in showing the images. does it have something to do with showing the entry summary and not the full entry?

Steeve

Amit Verma September 6, 2011 at 5:40 am

I have made the changes to display post thumbnail and uploaded the file at http://wordpressable.me/wp-content/uploads/2011/09/content-page.php-twentyeleven.zip. I have used the_post_thumbnail() function to display the thumbnail.

If you want to change the size of the thumbnail, please take a look at http://codex.wordpress.org/Post_Thumbnails.

Shelton Cook September 8, 2011 at 6:35 pm

Installed your plugin, dropped in this code -

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’);

- to my theme’s (twentyten) functions.php file which gave me this error -

Fatal error: Cannot redeclare add_category_box_on_page() (previously declared in /home/content/d/s/i/dsignorelli/html/main/wp-content/plugins/map-categories-to-pages/map-categories-to-pages.php:28) in /home/content/d/s/i/dsignorelli/html/main/wp-content/themes/twentyten/functions.php on line 544

- Then I took the code out and updated my functions.php file, which brought me to the same error. Now my whole site is down and my functions.php ONLY HAS 540 lines of code.

Thoughts?

Shelton Cook September 8, 2011 at 7:20 pm

The issue was solved. No Worries~

Steeve September 9, 2011 at 1:59 am

Hey Amit,

Thanks for all of your help! Does this plugin work with the WPtouch plugin foe viewing on mobile devices?

Just wondering,

Steeve

Amit Verma September 9, 2011 at 5:46 am

Never tried it. Will check and let you know.

Scott Taylor September 20, 2011 at 3:54 pm

Hi Amit,

I have the list of pages in a category displayed in the widget, but when I go to each page, the url shows the right page but the contents and page title are always the same page, no matter what the url shows, and what link you click on.

Check out the issue here http://sage.unleadeddevelopment.com/consulting-expert-witness-services

Thanks,

Scott

Amit Verma September 20, 2011 at 4:17 pm

Please send me the theme files where you have made the changes at amit@amit.me

Darryl Sarkisian October 14, 2011 at 4:28 am

Hi,
I have a multi blog/page site. I like the idea of the plugin but I don’t know if it is the right one for my site. I want to be able to separate pages/blogs (ie football blog vs basketball blog). Although I try to separate them by using the plugin, for example assign the basketball page to a basketball category and football to football, if I make a post to one, that post still will show up on both despite the fact that neither page has the other’s category assigned to it using the plugin. Have any idea as to why? Does the plugin not work for multiple blog pages on the same site?

Amit Verma October 14, 2011 at 5:56 pm

I think this is the right plugin for your problem. Make sure that you haven’t selected both the categories for the posts as well.

How are you displaying the posts on the pages? Have you customized page templates or are you using auto insertion?

Darryl Sarkisian October 22, 2011 at 2:48 pm

Thanks for getting back to me Amit. Currently I’m using auto insertion. I’m a programmer coming from the .net world and my php knowledge is very novice. I only am selecting one category per page, for instance baseball ONLY has the category baseball selected, as I only want baseball posts to go on the baseball page and not the basketball page as well.

Any hints you got I’ll take…and donate…when it works :) .

Amit Verma October 23, 2011 at 3:27 am

Are you using the latest version? Would you be able to give me access to the admin area, so that I can check the settings?

Email me at amit@amit.me

Manuel Perez November 10, 2011 at 1:41 pm

Hello Everyone!

I was wondering if anyone could help me! I recently moved my Wordpress Blog from one Host to another but it seemed like the transfer went well until I was navigating through my site and tried to click on the link at the bottom of the page that takes you to Older Posts and instead it took me to Page 1. I looked around and found a bunch of ideas but what I am curious is why did this happen after moving the site? It didnt happen on the older host. If anyone has any ideas on how to fix this issue please let me know.

Thanks,

Semper Fidelis,

Manuel Perez

Amit Verma November 10, 2011 at 3:19 pm

It seems fine to me. When I clicked on Older Entries, it took me to the Page 2 which seems normal.

Manuel Perez November 10, 2011 at 3:23 pm

Yeah,

I uninstalled the iNove Theme and reinstalled it! Now I have to recustomize it with my changes that I had before.

Thanks,

Manuel

Valter Gomes November 10, 2011 at 11:13 pm

Hello Amit,

First of all, great plugin you have here!
But, I’m having issues when trying to set the code on the page template, as it showing on the end of the page, and on a completly different layout of the current posts.

Can you help me out?
Best Regards,
Valter Gomes

Amit Verma November 11, 2011 at 3:47 am

Could you please share the URL and your code?

Valter Gomes November 11, 2011 at 10:59 am

I’ve managed to work it out in other way, I’ve assigned different services as a Portfolio type, and the pages allow me to show different portfolios, so I could work it like that.

Many thanks anyways Amit!

Raindance November 17, 2011 at 10:08 pm

Question-
Can it work to map to subcategories also? I see the category box on my edit page screen, but it doesn’t show sub categories, only parent categories?

Thanks
Laura

Amit Verma November 18, 2011 at 4:07 am

It does. It gives you exactly the same Category box as you have on Posts. Could you please send a screenshot Category box from Page and Post edit screen?

Clare December 13, 2011 at 12:44 am

Hi Amit,

I’ve been trying for a while to get your plugin in work for me, but I just couldn’t. Mainly, I wanted to use your plugin so that when I click on a category (listed via the default wordpress category widget), all the pages in that category would load. Wordpress would recognize that I had assigned those pages to those categories, but it wouldn’t display them.

So instead, I deactivated the plugin and used the code on your old page to insert the category box in functions.php, and I used the “displaying pages on category pages” code in functions.php as well. This worked great!

Until….I found that I couldn’t change my page’s categories. I would uncheck the box, update the page, and it would come back with the box still checked, as if I had changed nothing. I even tried Frankinsteining some of the new code (the function mcp_init() down to the end of function page_categories_metabox()) from the plugin to see if maybe the old code was too old to handle what I was doing, but when I replaced it, the category box just disappeared, but it seemed like the pages were still mapped to the categories.

I was wondering if I could get your help with this. What am I doing wrong?

Thank you so much. I really appreciate it!

Amit Verma December 13, 2011 at 4:49 am

You just need to
1) install the plugin
2) assign Pages to categories
3) enable “Show the Pages on Category pages” options from the plugin’s options page

It should then display the headings of the pages on category pages.

Let me know if you find any problem.

Clare December 16, 2011 at 4:52 pm

Thanks! I totally missed the “Show the Pages on Category pages” option. Works great!

Teri Williams January 4, 2012 at 5:27 pm

Okay, I’m totally confused so obviously I’m new to all this.
Where do I find the “Show the Pages on Category pages” or the plugin’s options page?
I’m trying to show all the posts from one category on a specific page. Am I even using the correct plug-in?
Thank you and Happy New Year!

Amit Verma January 5, 2012 at 4:59 am

Happy New Year!

You need to tag the Page with the same categories as of the posts which you want to display on that page.

There is a setting to display Posts on pages on the options page. You can find that under Settings -> Map Categories to Pages.

Derek January 8, 2012 at 5:45 pm

Hi, I’ve installed the plugin and want to display the category names on the main page of a site. I have pages of various artists and each artist is a category and each artist has a number of paintings. I have custom fields set up for painting titles and have assigned the artist name category to their various pages. What I would like to do is to find a way for all artist names to appear on an index page in alphabetical order, preferably by alphabetical title like ABC etc. I don’t know if this is possible. Thanks

derek

Amit Verma January 9, 2012 at 4:30 am

If you are using this plugin, I am assuming that you are tagging Pages with the categories and want to display Pages on homepage rather than the categories.

If you want to display all those pages in sidebar then use Pages or Custom Menu widget.

Derek January 9, 2012 at 1:46 pm

Thanks, I want to display them on the page not in the sidebar. I would like to have them show all the artists which are now categories as individual links to other pages but on a central page rather than on the side.
Thanks

Amit Verma January 9, 2012 at 4:05 pm

You can use http://codex.wordpress.org/Template_Tags/wp_list_categories function to display Categories in template file.

Ray Green March 14, 2012 at 8:40 am

Hi Amit,
As many others in this thread I am completely new to this.
I have successfully installed your plug-in and can see lists of the posts on each Category page. I would like however to show the full posts on the pages.
I am using the twentyten theme.
I would be truly grateful if you could give me an “Idots Guide” on how to achieve this.
Thanks again for a great plug-in and all your efforts to help us.

Amit Verma March 14, 2012 at 8:56 am
Amit Verma March 14, 2012 at 8:57 am

Oh sorry you want it for Twenty Ten. I will customize Twenty Ten theme file and will post a link.

Ray Green April 3, 2012 at 6:03 am

Hi Amit,
Sorry for getting back to so late. I was in Africa on Business with no Internet.
Thanks again for your help. Did you get chance to customize the Twenty Ten Template?
Ray

Amit Verma April 3, 2012 at 7:09 am

You can download the files from http://wordpressable.me/wp-content/uploads/2012/04/template-changes-twentyten.zip. It has two files. Place them either in twenty ten folder or in child theme folder of twentyten.

Ray Green April 3, 2012 at 8:04 am

Thanks Amit,
Do I need to do naything else apart from putting the files in the Folder?
sorry but i am completely new at this.

Ray Green April 3, 2012 at 8:08 am

Thanks Amit
Do I only have to copy the Files to the relevant folder or is there something else I need to do?

Amit Verma April 3, 2012 at 8:19 am

Yes, you just have to put these files in the theme directory.

Ben March 23, 2012 at 8:23 pm

What part of the code do I need to edit?

<div id="post-” >

<a href="” rel=”bookmark”>

<?php wp_link_pages('before=&after=&next_or_number=number&pagelink=page %’); ?>

Sorry, no pages matched your criteria.

Ben March 23, 2012 at 8:25 pm

<div id="post-” >

<a href="” rel=”bookmark”>

<?php wp_link_pages('before=&after=&next_or_number=number&pagelink=page %’); ?>

Sorry, no pages matched your criteria.

Ben March 23, 2012 at 8:31 pm

K I can’t post my coding, I am using the liquorice theme and have no idea what I need to change in the template to display the whole post.

Amit Verma March 24, 2012 at 5:00 am

You need to insert the code given at http://amit.me/assign-categories-to-pages-in-wordpress/545#template-changes just after the loop ends.

If still not sure what to do then send me the theme files on amit[at]amit[dot]me

Ray Green April 3, 2012 at 8:27 am

Brilliant,
Thanks again for all your support and help Amit

Mike D April 13, 2012 at 4:25 pm

First i have to say that this is a great plugin! Have a couple of questions ( as if you never heard that before).

I hard coded your hard work and the code is working great. one other feature that i need it to be able to sorts posts in a certian catagory. i have used Q2W3 post order and it does the job, however your feature seems to override the ability to sort and i wondered if you had any thoughts on the matter.

Matthew Roe May 5, 2012 at 7:33 am

Hey there!

I recently installed your plugin into my blog. Well, the reason I was wanting it is so that I could automate the tasks of having my child pages listed inside the parent page using the plugin “Cat2Page”.

Doesn’t seem like it’s working, was hoping I could get some help in fixing the issue or if you know what’s going on? It’s assigning categories like it’s supposed to, it’s just not showing the listings from the “Cat2Page” plugin!

Thanks,

Matthew Roe

Amit Verma May 6, 2012 at 11:09 am

If you want to display child pages of current page use example given at http://codex.wordpress.org/Function_Reference/get_page_children#Examples.

Let me know if you need my help.

Seth May 5, 2012 at 7:04 pm

Hi,

I am having an issue with the plug-in. When I add this code:

//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->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.
}
}

to functions.php in my theme I get this on my site:

Fatal error: Cannot redeclare change_post_type() (previously declared in /home/asecre5/public_html/here/wp-content/plugins/map-categories-to-pages/map-categories-to-pages.php:72) in /home/asecre5/public_html/here/wp-content/themes/pagelines/functions.php on line 33

As I am sure you have guess I am totally clueless on this stuff and I apologize if this question is addressed somewhere else. Thank you.

Amit Verma May 6, 2012 at 11:15 am

I have already used function name change_post_type in the plugin. Just change the name of the function and it will work.

This website has moved to http://amit.me/wp-plugins

Comments on this entry are closed.

{ 1 trackback }