I lost my iPod for several days. Relieved to have found it. Continue reading post "#2307"
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 [gallery] 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: Wordpress Custom Searches
The Wordpress search by default looks through the title and content of all available posts and pages for given query words. But sometimes you might want to only search a certain category or search custom fields or some other criteria. On the Canine Lifeline site, we have a dog section where we want to be able to list dogs based on a number of parameters, such as age, gender, adoption status, et cetera. We are currently storing dogs as posts in a particular category, and using Magic Fields to add custom fields for various aspects of each dog.
Wordpress sends search queries as GET requests from its search form. The "s" variable contains the search query, but others are allowed. In fact, if you're familiar with the "query_posts" function, many of the parameters for that are available, and the rest can be enabled, because the search is basically just a regular Wordpress query with parameters appended from the GET variables.
Samba: Another Freelance Project
Yay! I've got another freelance project now, and this one I'll actually get paid for. It won't be much pay, I gave them a very low price, but it sounds like I will get paid more from this job in the future: They want me to be their go-to guy for updating the site and new features. They will probably have me do things like update dates and add images, so it may be like an hour a month or something, not a lot, but something.
So finally, the project is for Samba Soccer Club, a small Cleveland youth soccer club. I got the lead from Ronda Leffel, the coordinator of the eBusiness program I was in at Tri-C. I met with them Saturday at Baker's Square to talk the project over.
They had a site at one point, but let that lapse, and now want a completely new site, from scratch. They still have the URL, so they will just have to get a host and transfer it, or however that works (I've never done it yet). I'm going to have to do a bit of research on hosts for them, but I might suggest they just let me manage their site on my hosting account. I've not done this before, but it sounds like Dreamhost's version of reselling is just letting us create users for our clients and bill them ourselves. They shouldn't have too much traffic, so this should work fine.
Continue reading post "Samba: Another Freelance Project"Canine Lifeline: Meeting and Start
Jason and I have begun work on the Canine Lifeline site I had mentioned as a fr…
Continue reading post "Canine Lifeline: Meeting and Start"