pod posts

WordPress: Shortcodes

I’ve been playing with shortcodes in WordPress. They provide a nice way to allow the client to insert certain content without them needing to even deal with HTML, such as predefined pieces or wrappers with specific classes or structure. They are the only way to effectively run PHP functions from within a page without actually allowing PHP code to be run. This can allow pulling things from data, such as custom fields or from Pods CMS. The built in shortcode, for instance, pulls image data from the database about images connected to a post.

It’s very easy to add a shortcode. You create a function that does what you want and returns a string to output in place of the shortcode then use the add_shortcode() function of WordPress to attach it as a shortcode. The function is done like:

function repFunctionName($repArguments, $repContent=null){
    return "some string";
}

$repArgument is an array of arguments passed to the shortcode like:

[repShortcode repArgument1="value1" repArgument2="value2"]
Continue reading post "WordPress: Shortcodes"

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.