I’ve posted the simple Wordpress pluggin that I mentioned months ago that shows subpages for the Wordpress ‘Pages’ feature. A couple people had asked for it, so now you can download it at the following location:
Hi Greg,
don’t remember precisely how I ended up here, but I’m happy I did. This subpages plugin comes right on time for me. I had the same problem you had. I did find a solution, based on some code I found in K2. Looking at your code and the code I used it’s almost the same, however, your solution seems a bit cleaner. (I had all the db logic in the sidebar template)
So thanks for sharing this Greg. And if I may ask: would you like to explain a bit how the code works? Most of it I can follow, but for example this: unset($cache_pages);if ($pageLibrary->getChildCount($id)) I do not yet understand.
Greg says...
September 26th, 2005 at 10:50 am
hmmm…i don’t quite remember what the $cache_pages was about – i think it may have been that wordpress was caching the list of pages – the entire list – so that you need to unset this if you want to get a subset of the pages for a given post.
the ($pageLibrary->getChildCount($id)) line and subsequent block, gets the number of child pages for the given page. If there are zero child pages, the ‘if’ is false and it skips this section. If it’s any number other than 0, it’ll go ahead and print out the table with the sub pages.
hope that helps…
Dann Sommer says...
September 27th, 2005 at 11:31 pm
hi greg !
… assuming you are reading the replies posted here – please confirm …
About your gcards sw : it looks really nice – in many ways – they might be useful for some of my small projects im working on
- in case … – would you be interested in having a version of gcards in danish language also ?
regards
dann
ps : it was just sooo difficult to find your contact info – or I may have slept to little, my brain spawning with new ideas, and started too early this morning …
- but, I simply couldn´t find your contact info – where is it … ?
dann
zeus says...
January 1st, 2006 at 8:23 pm
Hi, Greg,
I put the gnpagelibrary.php in the theme directory, and the page.php in the wp-content directory. However, there is the page.php have a include line which calls for adPane.php. However, this page is not included in your zip file, and there is php warning after the page is rendered. Any suggestion to fix it?
Zee
zeus says...
January 1st, 2006 at 8:24 pm
Hi, Greg,
I put the gnpagelibrary.php in the theme directory, and the page.php in the wp-content directory. However, the page.php has a include line which calls for adPane.php. However, file adPage.php is not included in your zip file, and there is php warning after the page is rendered. Any suggestion to fix it?
Zee
Greg says...
January 3rd, 2006 at 11:56 am
zeus – I think my theme includes a link to a page that has google ads. You can probably find the line in page.php that has adPane.php – probably includes or requires it, and just remove it from the file….
greg
Luke Freeman says...
October 9th, 2006 at 5:24 pm
Hi, I am using this plugin and all the breadcrumb links to home go to index.php in that pages imaginary folder (permalinks).
September 25th, 2005 at 5:19 am
Hi Greg,
don’t remember precisely how I ended up here, but I’m happy I did. This subpages plugin comes right on time for me. I had the same problem you had. I did find a solution, based on some code I found in K2. Looking at your code and the code I used it’s almost the same, however, your solution seems a bit cleaner. (I had all the db logic in the sidebar template)
So thanks for sharing this Greg. And if I may ask: would you like to explain a bit how the code works? Most of it I can follow, but for example this: unset($cache_pages);if ($pageLibrary->getChildCount($id)) I do not yet understand.
September 26th, 2005 at 10:50 am
hmmm…i don’t quite remember what the $cache_pages was about – i think it may have been that wordpress was caching the list of pages – the entire list – so that you need to unset this if you want to get a subset of the pages for a given post.
the ($pageLibrary->getChildCount($id)) line and subsequent block, gets the number of child pages for the given page. If there are zero child pages, the ‘if’ is false and it skips this section. If it’s any number other than 0, it’ll go ahead and print out the table with the sub pages.
hope that helps…
September 27th, 2005 at 11:31 pm
hi greg !
… assuming you are reading the replies posted here – please confirm …
About your gcards sw : it looks really nice – in many ways – they might be useful for some of my small projects im working on
- in case … – would you be interested in having a version of gcards in danish language also ?
regards
dann
ps : it was just sooo difficult to find your contact info – or I may have slept to little, my brain spawning with new ideas, and started too early this morning …
- but, I simply couldn´t find your contact info – where is it … ?
dann
January 1st, 2006 at 8:23 pm
Hi, Greg,
I put the gnpagelibrary.php in the theme directory, and the page.php in the wp-content directory. However, there is the page.php have a include line which calls for adPane.php. However, this page is not included in your zip file, and there is php warning after the page is rendered. Any suggestion to fix it?
Zee
January 1st, 2006 at 8:24 pm
Hi, Greg,
I put the gnpagelibrary.php in the theme directory, and the page.php in the wp-content directory. However, the page.php has a include line which calls for adPane.php. However, file adPage.php is not included in your zip file, and there is php warning after the page is rendered. Any suggestion to fix it?
Zee
January 3rd, 2006 at 11:56 am
zeus – I think my theme includes a link to a page that has google ads. You can probably find the line in page.php that has adPane.php – probably includes or requires it, and just remove it from the file….
greg
October 9th, 2006 at 5:24 pm
Hi, I am using this plugin and all the breadcrumb links to home go to index.php in that pages imaginary folder (permalinks).
For example http://www.ausrowtec.com.au/products/pricing/
Products links to: http://www.ausrowtec.com.au/products/ (good)
Pricing links to: http://www.ausrowtec.com.au/products/pricing/ (good)
Home links to: http://www.ausrowtec.com.au/products/pricing/index.php (bad, should be http://www.ausrowtec.com.au/)
Any help, please email me, luke[dot]freeman[at]three[dot]com[dot]au
Cheers,
Luke
February 9th, 2007 at 7:48 am
does it work with wordpress 2.1?
February 9th, 2007 at 9:03 am
apparently it does not work with wordpress 2.1 – I’ll have to take a look at it when I get a chance…
April 4th, 2007 at 4:40 pm
I just updated a slightly hacked version of your pluging Greg, and all I needed to do was replace…
post_status=’static’
…with…
post_type=’page’
HTH,
adam
December 3rd, 2007 at 3:21 am
very useful plugin. Thank you.
December 12th, 2007 at 1:54 am
Nice plugin.
February 21st, 2008 at 4:55 am
Thanks for this plugin, very usefull.
Sam
October 17th, 2008 at 9:57 pm
thank you, that is the best
November 6th, 2008 at 7:27 am
Thank you for nice plugin.
December 2nd, 2008 at 8:58 am
very useful plugin.thank you very much
February 12th, 2009 at 9:36 am
very nice plugin thanks http://www.dr-fatihdagdelen.com/estetik/karin+germe+estetigi/
February 17th, 2009 at 4:50 am
thank you http://estetikd.com/ Estetik
<a href=”http://estetikd.com/” /Estetik
March 2nd, 2009 at 6:04 am
thank you http://dr-fatihdagdelen.com/
March 4th, 2009 at 7:53 am
thank you very much very nice article
April 23rd, 2009 at 6:44 am
Thank you very much very nice article
Great information! Very useful for me. Thanks a lot.
The idea is awesome. Congrats.http://dorahospital.com/
May 4th, 2009 at 12:16 am
[...] http://www.apnacenter.com/?p=12764: http://www.gregphoto.net/index.php/2005/09/22/posted-wordpress-subpages-plugin/5: [...]
May 6th, 2009 at 3:37 am
I read all the comments, looks nice but did not work on my wordpress blog : http://www.pcgametrek.com
June 30th, 2009 at 6:00 am
Thank you
Duvar Kağıdı
June 30th, 2009 at 6:01 am
Great information! Very useful for me. Thanks a lot.
Duvar Kağıdı
June 30th, 2009 at 6:03 am
Thank you very much very nice article
Great information! Very useful for me. Thanks a lot.
The idea is awesome. Congrats.
http://www.kagididuvar.com/
June 30th, 2009 at 6:04 am
Thanks
http://www.kagididuvar.com/