When I first stumbled across WordPress (which I’m using to power my website), I was very pleasantly surprised by the excellent administration environment, and just how easy it was to setup and use. Before I even decided what tool I was going to use for my website, I had come up with a basic design and color scheme that I was going to use. I managed to stay pretty close to what I wanted, but there were several things that made it a bit trickier than expected.
In order to get my custom ’skin’ for WordPress I needed to create a theme – this is pretty easy as a theme is really only composed of a few pages. The template tags used to create a theme are relatively straightforward and I was able to get something up and running very quickly. The difficulty is that the template tags are aimed at very novice users, which means that they hide a lot of complexity. And while hiding complexity is often great, it also means added complexity when you try to do something that is a little outside of the feature set.
For example, WordPress has a feature called ‘Pages’ where you can create regular posts that act more like static pages and aren’t blog-like. In addition to not sitting within the standard blog flow, pages can have child pages so you can build a hierarchy of pages. An example of ‘Pages’ on my site is the ‘About‘ page you can see linked on the left. If I wanted to I could write a sub-page called About Me with sub-pages for My Education, My Resume, and My Hobbies. Now I don’t really have anything on this page, so I guess I’m giving a bad example – but you’re smart, you can imagine it.
While it was possible to create a hierarchy of pages, the only place to show it was really in the navigation bar on the left. Obviously this isn’t acceptable if you have several levels of nesting – the left column isn’t big enough. You can limit the ‘depth’ of the tree, but then the lower levels aren’t shown anywhere, and a page that no one can get to just isn’t too useful. I wanted two additional things:
- To show a breadcrumb under the page name which would have links to all of the parent pages
- To show a list of child pages
I understand that Pages were only introduced in the current release of WordPress, but these seem like two very obvious requests. The unfortunate thing with doing these is that the API provided by WordPress is so targetted at its own templating that it requires a developer to talk directly to the database to get data. Most of the template tags return data with HTML embedded, so if you want to use the data for another purpose they become useless. Using the WordPress plugin functionality I was able to write a class which augmented the standard Pages feature set with some useful functions.
I understand that the template functions return HTML to simplify things for the user, but it would be great if there were some lower-level functions which returned information as data (i.e. returning an array of child pages) so that the user can choose what to do with them. So while it might be easier to write:
1 | get_child_pages($id) |
I would personally rather write:
1 2 3 4 | $children = $page->getChildren(); foreach ($children as $child) { // do something } |
I think that this actually ends up being more readable because it’s not as spooky – you can see exactly how the data is being rendered on the page, and if you need to make a change to it you can do it write on the template instead of changing the source code of the API.
But….overall I’m very happy with using WordPress and how flexible the system is. I wish the team continued success with the project!
July 22nd, 2005 at 12:48 pm
Hello Mr. Greg without an email address!
I was wondering if you would be kind enough to post your hack for the breadcrumbs. It would be much appreciated.
Thank you kindly, kind sir!
September 20th, 2005 at 8:52 am
I’m currently working with Breadcrumb Navigation 0.8.8 and trying to get it to do what you’ve so successfully done for subpages here on your site.
I’m developing a site for a graduate school at a university in Boston and have to match existing technology to be sure they’ll be accepting of a Wordpress solution. Would you be willing to details how you programmed your pages and subpages to appear in the breadcrumb trail? I’ve already hacked to pieces a number pages and plug-ins, but this one has me stumped.
I also like how your subpages appear in a secondary menu floated on the right. Very nice design!
September 22nd, 2005 at 10:54 pm
i’ve added my plugin (and the template page that uses it) at the following location:
http://www.gregphoto.net/download/subpages.zip
enjoy…
greg
September 22nd, 2005 at 10:58 pm
[...] Wordpress – the great and the not so great [...]
September 20th, 2006 at 6:32 am
Hello Greg. Nice of you to share! Is this plug-in compatible with later versions of Wordpress?
Best regards, Jakob G.
September 20th, 2006 at 8:19 am
@Jakob – seems to be compatible with the latest Wordpress…as I’m currently running it on 2.x. It’s a very simple pluggin…it’s only real downside is that it requires changes to template files. I’m sure someone who is more knowledgeable in wp plugin development could make the process cleaner….
Greg
October 7th, 2006 at 3:56 pm
Cool! Thanks, I’ll give it a try
January 23rd, 2007 at 7:15 am
Hey Greg, I just wanted to drop you a note to say thanks so much for sharing this. I am in over my head (nearly
) getting a WordPress powered site working and I’ve never attempted anything like it before. I experienced exactly what you wrote about regarding trying to get a clean list of child pages and it was making me lose sleep. Thanks to you I’ll sleep tonight. Cheers!
January 29th, 2007 at 10:02 pm
I just upgraded to WP 2.1 and this subpages plugin no longer appears to be working. My page is simply blank where my list of child pages used to be. I’ve read they made a change to the WP database. Is there an update to this plugin so it will work with WP 2.1? Please let me know as this plugin does exactly what I want.
Thanks
February 9th, 2007 at 2:30 pm
Hi, id just like to say i tried WP but im sorry for the type of site i wanted i found DW MX and Actinic jut the ticket. But i do see some of the good things that could be useful
April 25th, 2007 at 11:36 am
does this plug in work with late versions of wordpress?!
____________________
http://top10songschart.com/
October 13th, 2007 at 12:44 pm
yeah. I wonder it too. is it work for wordpress 2.3?
October 19th, 2007 at 10:15 pm
I do like the latest design or wordpress. Compared to blogger it was more an excellent choice if your going to used wordpress. The design and template is more professional looking and creative as well and the template is superb but what I don’t like is the added nofollow plug in but upon searching about this I have find out that we can turn off those type of plug in and choose dofollow plug in in exchanged for such nofollow plug in system .
November 7th, 2007 at 11:53 am
please more info if this plug works with the latest WordPress ?
December 13th, 2007 at 9:04 am
I tried using the plugin in the new wordpress but it does not seem to work.. it just merely shows up blank on my blog.. the child pages are not working.. maybe you could help out greg .. thanks very much
December 25th, 2007 at 9:52 pm
I love WordPress — the plugins are so powerful and it can be extended in so many ways. I.e. as a Digg-clone, message board / forum, brochure site, etc.
And tens of thousands of prebuilt themes to boot…
January 10th, 2008 at 5:15 am
wodpress is great that you make many pages everyday but the cons is it loads the pages slowly.
March 5th, 2008 at 10:04 am
Yes I agree the wordpress is still slow. http://www.estetiks.com/
September 19th, 2008 at 5:21 am
wodpress is great . Thanks for info
October 4th, 2008 at 6:31 pm
wodpress is great . Thanks for info
http://www.aryol.com.tr
November 24th, 2008 at 8:01 am
THis page was written in 2005 and many waters passed under the bridges (Turkish saying). Now I think wordpress is much much more fast and many bugs are solved, so many nice plugins are everywhere. Take a look at my site: http://www.estetiks.gen.tr/
My favorite plugins are:
1. all in one seo
2. wp-recaptcha
3. related posts
4. wassup
5. google sitemap-generator.
January 28th, 2009 at 8:40 am
nice post!
February 12th, 2009 at 9:35 am
very nice post http://www.dr-fatihdagdelen.com/estetik/karin+germe+estetigi/
February 17th, 2009 at 4:52 am
thank you http://www.estetikd.com/
February 28th, 2009 at 12:10 am
Thanks for such a useful post about sleep apena due to snoring. I am also suffering from such problem due to my brother. help me.
Thanks
March 2nd, 2009 at 6:06 am
thank you http://dorahospital.com/
March 4th, 2009 at 7:54 am
thank you very much very nice article
March 5th, 2009 at 2:31 am
thanks!
March 9th, 2009 at 5:57 am
My bro snore at night and his snoring disturbed my whole family. So please provide me some tips to stop my bro snoring. Please help me!!!!!!!!!
April 17th, 2009 at 4:15 pm
Nice article you got. I enjoyed to read it:)
http://www.tutobook.com
May 17th, 2009 at 11:59 pm
cam balkon -
June 1st, 2009 at 11:37 pm
[...] Graphics by Greg Blog Archive Wordpress the great and the Posted by root 2 hours 2 minutes ago (http://www.gregphoto.net) I wish the team continued success with the project getting a wordpress powered site working and i 39 ve never attempted anything like it before leave a comment name required mail will not be published required website Discuss | Bury | News | Graphics by Greg Blog Archive Wordpress the great and the [...]
June 8th, 2009 at 3:46 pm
[...] Graphics by Greg Blog Archive Wordpress the great and the Posted by root 1 hour 16 minutes ago (http://www.gregphoto.net) Getting a wordpress powered site working and i 39 ve never attempted anything trying to get a clean list of child pages and it was making me lose sleep leave a comment name required mail will not be published required Discuss | Bury | News | Graphics by Greg Blog Archive Wordpress the great and the [...]
June 9th, 2009 at 11:29 am
[...] Graphics by Greg Blog Archive Wordpress the great and the Posted by root 1 day 22 hours ago (http://www.gregphoto.net) Getting a wordpress powered site working and i 39 ve never attempted anything like it before hospital says march 2nd 2009 at 6 06 am leave a comment name required mail will not be published required website Discuss | Bury | News | Graphics by Greg Blog Archive Wordpress the great and the [...]
June 12th, 2009 at 10:42 am
Fantastic Post, Thanks for your nice information, keep it up!
Jane
June 15th, 2009 at 5:05 pm
[...] Graphics by Greg Blog Archive Wordpress the great and the Posted by root 15 minutes ago (http://www.gregphoto.net) Existing technology to be sure they 39 ll be accepting of a wordpress solution getting a wordpress powered site working and i 39 ve never attempted graphics by greg blog archive wordpress the great and the paid surveys says it before leave a comment name Discuss | Bury | News | Graphics by Greg Blog Archive Wordpress the great and the [...]
June 19th, 2009 at 6:17 am
[...] Graphics by Greg Blog Archive Wordpress the great and the Posted by root 4 days ago (http://www.gregphoto.net) Getting a wordpress powered site working and i 39 ve never attempted i wish the team continued success with the project getting a wordpress powered site it before leave a comment name required mail will not be published required Discuss | Bury | News | Graphics by Greg Blog Archive Wordpress the great and the [...]
July 6th, 2009 at 7:38 pm
thanks !! very helpful post!
how to hack facebook passwords
how to hack into someones Yahoo
how to hack Hotmail password
July 8th, 2009 at 6:35 pm
I like the straight hair.I really like it.
July 9th, 2009 at 10:45 pm
thanks for sharing
Buy Wholesale Products from Chinese Wholesaler, including cheap wholesale electronics
this is my website http://www.trademic.com
July 10th, 2009 at 9:01 pm
how to hack a facebook account – Hack AOL for FREE
hack Verizon account passwords
hack myspace passwords
July 11th, 2009 at 7:05 am
Nice one dude
July 14th, 2009 at 3:22 am
What are your goals in life?
July 15th, 2009 at 9:31 pm
how to hack facebook – Hack MSN for FREE
how to hack a facebook
hack facebook
July 17th, 2009 at 7:55 am
Tell me more.
July 17th, 2009 at 9:27 pm
how to hack a Yahoo account – Hack Windows Live for FREE
hack Windows Live Messenger passwords
how to hack into someones Hotmail