wordpress posts page 5

Stearns: WordPress Custom Queries

For the Stearns site, we need to list upcoming events on the home page.  Using Flutter, I created a custom write panel for the events (and other items).  The events are simply posts that have a custom date field attached to them.

I was attempting to use the “query_posts()” function to get the posts I need.  I discovered that it is possible to use this function multiple times on a single page.  I previously thought you were unable to because of “the loop”, but you only have to make a few accommodations for the page name and other such WordPress variables getting changed.  I was able to use this to output the page data on our home page plus two categories of posts.

Unfortunately, “query_posts()” allows limiting by category and sorting by a custom key, but no less than, greater than, or other such comparisons with the meta key [wrong, see end of post].  So I decided to make my own SQL query, to be run with the “$wp_db->get_results()” function.  The function allows a straight SQL query to be run.  Then some other functions are used to put the result set into “the loop”.  So, the code to run my custom query looks like the following:

Continue reading post "Stearns: WordPress Custom Queries"

Stearns: Using WordPress as CMS

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.

Continue reading post "Stearns: Using WordPress as CMS"

Lynda.com WordPress Certificate

Our class decided to use Lynda.com to learn more about WordPress and some other topics that will help us with our Stearns project.  Our teacher has an account and was able to set up a limited time and course version for us at a reduced price.  We are doing five courses with a little over a month to complete them in.  I was worried this would be too short, but have been moving along pretty quick thus far.

Just recently, I completed the “Self-Hosting a WordPress Site” course, and they gave me this certificate for my trouble.  This was the most important for the course, so that is why I did it first.  I don’t know what weight these certificates would really have on a portfolio or resumé, but I think I will complete a few courses just for those.

So far, most of the videos I’ve watched have been about stuff I already know somewhat well, but there have been tidbits here and there to fill in some missing knowledge and a few videos about things I in fact know little or nothing about.  Some of the videos seem a little long winded, repetitive, slow moving, or boring at times, but they do seem like they’d be good for complete beginners.

I’ll continue with the other four courses we have available.  I’ll probably not be able to complete them all, but at least a couple more would be good.  We have an SEO one which would be especially helpful, but is also rather long.


Stearns Design Mockup Chosen

On Monday we met with Debbie to show off our design mockups.  Wednesday Debbie came back, bringing in three board members who would need to be involved in the decision.  They discussed various things about the site, including what it will be including and what they have for it.

They also were ready to make a decision on the mockup they wanted.  They had done some user testing of the mockups.  Rocki’s was chosen.  It has a picture of the front of the farm in the header, which they liked because it would be the first thing you’d see if you went there.  But they did want some changes to it.  They wanted a lighter brown for the wood grain that makes up the other part of the header.  They wanted a more solid navigation menu rather than the hanging signs currently in use.  And they wanted a less cluttered appearance for the home page.

They gave Jason’s second place.  His was very clean, also using a wood grain and a horizontal drop-down menu.  His drop-down seemed to be more along the lines of what they wanted, so something like that may be placed into Rocki’s.  Many of us were thinking that Jason’s would be chosen.  But you can never be sure.

So finally we will get to start building the actual site.  This should be the fun part, certainly the part that I have more experience with.  The site will be built using WordPress, so there won’t be a lot of actual programming most likely.  We may need to figure out how to interface other data with WordPress and add admin pages for it.  We will certainly need to figure out how to use “feeds” to get the information we want where we want it.  We’ll need to figure out how to set everything up so that it is easy for them to update.  Most of this should be doable within WordPress or using plugins, no hardcore programming. We’ll see though.

A lot of time will certainly be spent turning Rocki’s Photoshop theme into a real WordPress theme.  Then of course there is the insertion of the pages and filling them with content.  It will need to be organized in a way that will be easy to update for the Stearns people.  This may be hard.

I’m looking forward to some fun and some learning.


WordPress.com blog

I have created another blog, separate from this one, on wordpress.com.  I did so as a requirement for the Web Design II class I am taking at Tri-C.  It mainly stores information about the project we are working on for the class.  Since it is my first project of this sort, full from start to finish for a client, it contains my first workings and views on parts of the process.

I am not sure how to handle this blog though when I am done with class.  It obviously will no longer be needed for that, and maintaining two completely separate blogs has its problems, what with increased maintenance time, separated data that all may be related, separate presences, etc.  It may work though if they have two distinct purposes.  I’m not sure that I really need it separate though.

WordPress.com has a number of features, such as integrated stats and greater connection to other blogs, but it has limited features and some important features such as style need to be payed for.  So I may not want to keep the account.

So I could potentially just merge it onto here.  I have also been thinking about maintaining two blogs or one blog that has a fully separated category of posts from the front end with completely different appearance and no access to the other categories.  I would do this on my planned portfolio site for my “professional” posts while I maintain the other blog for my personal posts.  So I could potentially place the wordpress.com content on the professional blog and move some of my older web and server related posts there as well, maybe after a bit of cleanup.

I am also considering breaking away from wordpress by building my own blog ware.  This would give me more control over the data, the blog functionality, and integration into the rest of the site.  But this would take some time, and I have a lot of other projects that would have priority over that.  Getting it anywhere near the capabilities that I like from wordpress especially would take a while (don’t even know how to handle pingbacks/trackbacks).


wORDprESS Capitalization

Hmm, an interesting discovery I just made:

wOrDpress seems to change the capitalization of all instances of its own name, ie “woRdpreSS”, within the title and content of posts. Since URLs can be case sensitive, this caused a problem for one of the links I had on a previous post. It was changing the lowercase “p” to uppercase “P”. To solute the problem, I used the HTML escape sequence “p” in place of that “p”, and the link works just fine. I’ll have to watch for that next time.

[Update] Interestingly, the capitalization wasn’t changed on this post at all, but it was on the other. I’m not sure why.[/update]


WordPress as CMS

I’ve been researching WordPress as a CMS for potential use on my own sites, but some of the information could certainly apply to the Stearn’s Farm project.

WordPress as CMS links:

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]


Full WordPress Blog

We set up the full version of WordPress (from wordpress.org) for learning how to work with it. Mine can be found here.  I’ve already had experience working with the full version of wordpress (I’ve used it for years on my own site), but I haven’t gotten too far working with the themes.  I’ve taken this opportunity to make a theme nearly from scratch.  I’ve used the Sandbox theme, deleting all CSS but leaving the html/php templates.  I’ve considered modifying those as well, as I don’t like everything about them and I may need to to get the site to work as desired.

Anyway, I’ve created a semi-fluid centered layout there using absolute positioning within a div.  I’ve been wanting to do something like this to allow the navigation and other non-main content to be placed at the bottom of the page structurally but still where I want it for appearance.

It works fairly nicely, though it still has some problems.  For instance, padding on any of the absolutely positioned boxes expands them and messes up the layout.  Any padding must be done on sub-elements.  Borders on any of the main blocks don’t work either, and can cause layout problems.  And since the side columns are absolutely positioned and take up no height, I need a min-height to ensure all of their content doesn’t float out of their box.  I hope to continue working on the theme to correct these problems, and may use something similar for my own website.

I recently (re)read about elastic layouts.  I find the idea to be good for usability:  The whole site scales when the text size changes.  So I’ve considered changing the theme to work completely based on em’s for sizing, except I’d have to use a workaround for the full image header.  Strangely though it seems most newer browsers can scale any site almost as if they were already elastic:  With the aforementioned theme, IE 7, Firefox 3.5, and Safari 4 scale the whole page, including the header image and pixel width sidebars, down or up just fine and even maintain line lengths through part of the scaling.  Currently the page is 100% width unless the browser goes wider than its max-width, so I’d try to keep that if going to em’s.

The theme hasn’t been tested in IE 6 yet, since I don’t think I have a copy:  I may have to use a virtual version or another computer.  I imagine it will fail miserably there.  I haven’t yet delved into the conditional stylesheets, but I may add one just for IE 6 if the site doesn’t work well with it.

I can’t figure out how to apply this theme to this wordpress.com blog.  It seems like it may cost money to do.  I’ll have to investigate further.  I may end up moving this blog for the class over there, maybe converting this into a personal blog.


WordPress and SVN

I’ve been thinking about it for a while, but I finally decided to use subversion to update my wordpress instead of the download, copy over to server, copy in all old files method. Details on using SVN with wordpress can be found on WordPress.org.

Since it was my first time, I had to do an initial install so that all the subversion tracking data would be there. The command for installation, which would be used for a new install, was just a simple one line thing with the url of the install and a few flags. Then I had to copy over my htaccess, wp-config, and wp-content, all simple and easy.

Because this brought me up to date, I was unable to try the update type commands. But it seems extremely easy, just a one line command again, plus the web based upgrade script.

This should make my upgrading much faster and easier, and so lessen the delay between upgrades.

[Update 09/01/10]The steps, which I should have included before:
$ cd blogpath
# for trunk versions you can simply update
$ svn up
# OR for full point revisions, you must use the switch command to change versions
$ svn sw http://svn.automattic.com/wordpress/tags/2.7/ .
[browser]updgrade.php

[/update]

[Update 2/13]I’ve now done an update via subversion. It was in fact extremely easy, just one simple command line command followed by the upgrade.php script. Everything works fine, no copying and moving files and what not, although a backup is a good idea.[/update]