There are many issues encountered when using WordPress as a CMS. One thing that is common on regular websites is the concept of sections. Different sections might have different highlighted or open menu items, sidebar content, layouts, or actions from the same widgets (search this section for instance). WordPress offers the ability to use different template files depending on the category of posts or what is selected for a page. This is somewhat limited though, as sites might have multiple pages and categories in a section. WordPress also has various functions that can be used in “if” statements to determine if the current page/post matches certain criteria. These can be logically connected in “if” statements to determine if “the_post” is in a section and placed anywhere in template files, but this requires repeating the same logic questions in every place you must determine the section, and would thus be a pain to maintain.
To keep these “if” questions in one place, I built myself a function to store them in, allowing me to ask if a page is in a section using only a name.
Yay! I finally found a job. After six months of no income, I needed it. I’m doing front-end development for Cogneato, a small web development firm in Akron. They’ve done quite a few sites over the past decade, and have their own CMS/CRM they’ve built over that period. It’s pretty neat, allowing for some complicated things to be done with data and interesting features for managing customer information. It has many fancy AJAX features in the administrator interface. There have been seven people working there, and another one is coming soon. I only get to work on the front-end though.
Cogneato is only a 20 or so minute drive from my house. The atmosphere is very casual (hoodies instead of ties) and relaxed, very comfortable to work at. The owner and all the employees have been very nice.
Our layout has some pages with a three column layout and some pages with only two columns. The left column is always the same, but the other two will have one or two columns based on individual page content. For a while, we’ve had the third column on the home page and an empty third column on other pages, but we ran into troubles when we wanted to add the third column content to the other pages.
The columns use float to get their positioning and can’t be inside each other or the text from one would flow under the other. A few options came to mind. We tried closing template divs and opening others in the HTML editor of the page content: this did not work for us, somehow removing the background that was supplied by a wrapper. It would be trouble for Stearns anyway. We also tried removing the container for the center column from the template and putting one div into two column pages, two into three column pages. This gave some difficulties with the editor, would require the divs on every page, and would be difficult for Stearns and us to work with.
Magic Fields is a fork of Flutter that is open source GPL and seems to have more active development going on. It also seems to be much more streamlined and simplified. It doesn’t have all of the features of Flutter, but I didn’t know what those features were anyway and wasn’t using them. I switched to it for these reasons and in hopes that it would fix a problem I’m having.
The problem is that posts created outside of the Flutter write panels do not appear inside of that panels “Manage” pane, nor do posts on write panels that have no custom fields. Two of the panels had no custom fields, and some items were not added with the write panel at all, so the “manage” panels were not working for us. I discovered that Flutter associates its custom fields with posts in a particular table, and the “manage” pane only shows items in that table.
Moving to Magic Fields, I thought it might fix this. They provide a script to move all panels and items from Flutter, which made that easy. Unfortunately, the plugin still uses the same method of populating the “manage” panes, and so didn’t fix my problem at all.
I really just want that pane to have all items from the related category, whether they have populated custom fields or not, whether they were added through the write panel or the posts panel. I may have to modify the plugin to make this happen. Otherwise, I will have to somehow craft a script to find unassociated items from a given category, insert a custom field with the relevant name for that type, and then insert the cross-reference row. That would be a complicated affair and would do nothing for new items created after the script is run. But I am worried that not having an associated field set in the database will cause problems when those items are displayed. We’ll see what I can manage and have time for.
This plugin was recommended by Kevin Behrens, maker of Role Scoper. It allows removal of panels and individual items from the admin section based on role/group. So far, I only have used it to remove the “Add New” pane of the posts section, but I think it will allow me to remove the HTML tab from TinyMCE as well as a few other things to clean up the interface for the Stearns folk. The easier we make it for them, the better.
We finally bought the domain name and hosting account for Stearns, at stearnshomestead.com. We were expecting them to want a .org due to their nonprofit status, but I guess they wanted the familiarity of the .com. They have no company credit card, so Angela had to set up the account and will bill them for a check. I don’t know what they’ll do in the future: They’ll probably have to have one of their members do a similar thing.
We moved our WordPress install from its temporary location in a subfolder of one of Angela’s sites to the root of the new site. There was perhaps a bit of trouble moving the site, but once we figured it out, the install worked perfectly. To move, we transferred from one site to the other via FTP all site files. We then used PHPMyAdmin to export the site data as SQL and then import it to the new site (didn’t have to use PHPMyAdmin for the new site, as the host has an import function in their control panel). We then had to update the config file for WordPress to reference the new database. Finally, we had to change two URLs in the options table in the database. Everything now works.
I mentioned my concerns of using WordPress as a CMS in a previous post, but now it is getting to be the time to find solutions to our problems. We have installed a test wordpress site and have begun working on it. The style is still bare, but I am looking at functionality issues. I used those links from the previous post plus some other sites found on Google to find potential solutions. I haven’t made any final decisions yet on what should work for us, but I’ll document some of my considerations
Events and Recipes
One issue we will have is needing custom data fields for the events and the recipes. WordPress has custom fields built in, but it would be best if the fields could be there automatically, without them having to add them and get the names exactly right each time.
Flutter is one plugin solution that looks nice. It allows custom write panels to be created in the admin section, so that events or recipes could be managed and added separately from the normal posts. It allows custom fields to be defined for each panel as well. It even allows data types to be defined, so dates for the events could be entered easily. It does have some issues, such as some bugginess and rumored slowness when post numbers get high. This did sell me on the custom write panel idea though.
I will update this post as I find more information and possibly pull out info from the links.
So far it is looking like WordPress will not work for my personal plans. The main reason I was interested was the nice text editing features that I certainly would not be able to recreate myself, and of course the fact that I potentially wouldn’t need to write that much to have a continuously update CMS. But it seems like it would be a lot of work to get it to do what I want it to.
[update] The text editor used in WordPress is called TinyMCE which seems to be a seperate project that can be integratable into any site. I may build out my own sites but include TinyMCE as an editing option.[/update]