Before attempting this tutorial, you should have already read and completed the “ClassiPress Child Theme Tutorial Part 1“. Assuming you have done this you will already have a folder for your child theme which leaves us right where we left off.
What we will Cover in Part 2
- Creating the functions.php file.
- Overwriting an existing function (the prices function in this tutorial).
- Creating your own new function in the function file.
- Use the child theme to modify the index-directory.php file so that our homepage is modded.
- Build a new dashboard template to show confirmation messages and activate it.
Step 1: Creating the functions.php file
Navigate to the child theme folder you previously created. Now we need to create a new file in it. You can do this a variety of ways, but we are going to use a technique that is the most “universal”.
If someone has ever submitted an ad on your site without any images attached, you’ll notice it uses the “No Image Available” placeholder image. For most people that’s fine but if you didn’t like the wording, color, or wanted to change it to a different language you needed to use image editing software.
Not anymore. Here’s a simple tutorial on how to easily change the default placeholder image without using any editing software.
Over the last few months it’s appeared rather quiet here at ClassiPress HQ. In actuality, we’ve been quite busy behind the scenes working on a new update (v3.0.3) and a brand new company web site. We plan on launching the new site early next month (which we’ll announce in a separate post and email to all customers) and then the 3.0.3 update will be released soon thereafter. It’s a bug fix and feature enhancement release so nothing major.
Anyhow, the reason for this post was to provide a handy bit of mySQL code when migrating your ClassiPress site to another domain.
While going through the demo site migration process, we had to change a bunch of legacy meta_values which have the image urls hardcoded in them so the thumbnail and ad images weren’t showing up. Instead of manually having to go through hundreds of records, it made more sense to write a custom sql query to handle the same change in a matter of seconds.