wordpress posts page 4

New WordPress.com Theme

I searched through every 2-column theme with widget support in WordPress.com’s repository (there were 58) in an attempt to improve the appearance of my blog. The main problems with the old one were that levels of headers weren’t differentiated well enough (the second level ones looked like first level) and the code blocks weren’t separated from other content well enough. I couldn’t find one template that I was fully happy with. Every one had something I didn’t like, and very few even had both good code block separation and good header differentiation.

This theme (Neat!) is one of the few that did well enough with those issues and overall for me to choose. It has nice distinct code blocks and I can easily tell the difference between headers. I’m not big on the colors or the header (though that’s configurable). It removed my tabs for pages, but that was no biggie. A few other minor issues. I may stick with it for my tenure at WordPress.com.

Continue reading post "New WordPress.com Theme"

WordPress: XML Sitemap with XSLT WordPress Theme

For the Canine site, we wanted to have an XML sitemap to help search engines index the site. The sitemap can help search engines find all content on the site as well as tell it which pages are most important, how often they are updated, and when they were last modified.

There seems to be a number of plugins to generate the sitemap automatically for WordPress, but the Google XML Sitemaps plugin seems to have the highest rating and have gotten the most mention in blogs. Jason had used this plugin already for his site, so we knew a little about it already, thus we went with it.

After some minor configuration, it worked just fine. It regenerates a static file every time a page or post is updated. Not as dynamic, but it saves processor time. I doubt the plugin will work with Pods at all, since that’s outside the posts/pages dataset. Our Pods content probably won’t be as important anyway. I could potentially look into modifying the plugin if need be for that.

Continue reading post "WordPress: XML Sitemap with XSLT WordPress Theme"

WordPress: Multiple Dynamic Sidebars

I’m making a “blank” type template for WordPress that I’ll be able to modify for sites as I develop them.  I wanted to make sure my template was compliant with the dynamic sidebars feature of WordPress and have multiple sidebars already there for quick creation with new sites.  I wanted the first to have some default content, while the others would not be displayed unless they have dynamic content.  I suppose that might not end up being useful for the fixedness of the one-off designs I’ve been doing, but we’ll see…

The tutorials I found didn’t discuss how to make the container for each of multiple sidebars display only if the sidebar had dynamic widgets.  The is_dynamic_sidebar() function is what was needed.  So I register my sidebars like normal, in “functions.php”:

if(function_exists('register_sidebar')){
register_sidebars(2, array(
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
}
Continue reading post "WordPress: Multiple Dynamic Sidebars"

Canine Lifeline: Meeting and Start

Jason and I have begun work on the Canine Lifeline site I had mentioned as a freelance project.  It will be for free (they are a non-profit) but will be good experience and we will get our names and links in the footer.  As our first project outside of school together and my first real freelance project altogether, the experience should be great and free should make it more relaxed.

We met with the clients on Sunday to discuss the project.  We met at Yours Truly in Valley View and discussed the site over lunch.  They all were very nice and seemed to know a good bit about websites and what they want, which should help a lot.  They gave a good idea of the functionality and content they wanted, as well as some basic thematic ideas.

Their current site is a simple four pager built with a template and hosted for free with adverts.  We will be building a many-page CMS for them, using WordPress after our experiences with the Stearns project, so they can make frequent updates.  They want a dynamic site that entices people to visit frequently for updates.  They, like Stearns, will need some custom data types, so I will be using Magic Fields again as well as trying out Pod CMS, which should allow for more complex uses of data.  We shouldn’t need multi-column pages for this site, so we hopefully won’t run into the TinyMCE editor troubles we had with Stearns.

Stylistically, they want a blend of professional looking with bright and colorful.  Since Jason is the designer of our duo, I will let him handle most of the theme design while I work on the functionality of the site.  I do want to at least give a try at a couple of hand drawn mockups though.

Since this is about all I have going on, I will continue to post about this project, how its going, and anything I discover from it.


PHP Parser for RSS Feed From WordPress.com

I’ve been working on my own site a bit since getting out of school. I’ve been pulling an RSS feed from this blog onto my homepage for a while now, using something based off of this script. I try to keep the markup valid. The feed has given me a bit of troubles for valid markup, mainly with escaping ampersands. One problem was that I was using this function:

function pagFixRSSEncoding($argString){
    return mb_convert_encoding($argString,'HTML-ENTITIES', 'UTF-8');
}

which I had gotten from somewhere. I’m not sure what it does, but it seems to do nothing for me. I removed it, though I’ll reinstate it or look for something else if characters other than ampersands give me trouble.

I was also using this function:

function pagFixLinks($argString){
    return str_replace("&", "&amp;", $argString);
}

to fix the ampersands in the “link”. This simply replaces all ampersands with the proper HTML entity in the passed string, works just fine.

Continue reading post "PHP Parser for RSS Feed From WordPress.com"

Worpress Page Template Next & Previous Links

I ran into this problem on the Stearns events and recipes pages, which both use custom templates pulling in posts from a particular category.  We use the query_posts() function on those pages.  The next_posts_link() and previous_posts_link() functions are used on normal multi-post pages to navigate through more items than appear on one page.  Using the query_posts() function without the paging, such as:

query_posts("cat=4&limit=5")

the paging doesn’t work at all: It just shows the same results for each page. To get this to work, you must tack on the “paged” parameter with the “$paged” wordpress php variable, like:

query_posts("cat=4&limit=5&paged=".$paged)

and pagination will work just fine. You can only do this for one set of items, but you’d want to break out to a separate page for multiple anyway.


Stearns: Slideshow, Media Tags

We wanted an image slideshow for our sidebar. I looked at some of the plugins available for doing this, but none looked to be exactly what we wanted, nor did they look very simple. I’ve worked with jQuery before with various image things, so I used it to build my own slideshow (building it in OO added to the development time, but it should be fairly versatile now). Then I had to get the appropriate images from WordPress to work with my javascript, which was quite a bit of work as well.

We want the images to easily be updatable by Stearns.  I don’t know why I was dead-set on having them be able to use the media library, but I was.  They could FTP files into a folder, which would be much easier for me.  But they might not even know how to do this, and letting them handle everything through the wordpress interface is preferable.  They’d have to crop and size them properly.  The images in the folder also wouldn’t have captions.  So I pressed on.

I thought perhaps I could have them update a gallery on a particular page, after having thought the gallery function wass very neat.  But it seems there is no way to add items from the media library to a gallery for a page (not in regular wordpress anyway) and I’m not sure that the “delete” link does what I want for removing items from the gallery (and I’m not willing to try).

Continue reading post "Stearns: Slideshow, Media Tags"

Stearns: Two Content Columns Per Page

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.

Continue reading post "Stearns: Two Content Columns Per Page"

Stearns: Flutter now Magic Fields, Adminimize

Flutter/Magic Fields

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.

Adminimize

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.


Stearns: Move, Menu, Flutter and Permissions

The Move

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.

Continue reading post "Stearns: Move, Menu, Flutter and Permissions"