Build Your Own Business Website header image

Introduction to Customizing Thesis 2.1 Using PHP – Part 1 – Introduction – Using Custom PHP

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Applies to -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

Good morning everybody and welcome to this special seminar on Customizing Thesis 2.1 Using PHP. This is an introductory seminar so for some of you this will be brand new but for others of you, I know that you have been programming in Thesis for quite a while. I’m intending to provide something that’s going to be useful to everybody one way or another.

Functions We’ll be Creating

What we’re doing here today is creating a couple of functions in Thesis 2.1. The first function is going to change the length of the excerpt and the second function is going to add a “Read More” link to the excerpt. We’re going to create these two functions in two different contexts.

The first context is going to be in the traditional Thesis Custom Files and the second context is going to be using the Thesis Box API and we’re going to create a box that will use those functions.

Who is this Seminar For?

So, who is this seminar for? This seminar is primarily for somebody who has a basic understanding of PHP syntax. If you’ve never done any PHP coding at all and if you’re not familiar with PHP syntax at all, then you may get some benefit out of watching this but it’s not primarily directed at you.

We’ll do some very introductory work on PHP at another time but at the moment, this is an introduction that is for folks who have some basic understanding of PHP syntax.

If you have spent a bunch of time working in Thesis 1.8.5 and have done a bunch of cut and paste PHP, this is exactly for you. Not only are we going to show you how to essentially do the same thing in 2.1 that you’ve been doing in 1.8.5 but then we’re going to take it to the next level and show you how to do the same kind of thing with boxes. So if you have experience in 1.8.5 then you’re well positioned to get a lot of benefit out of this seminar.

Tools and Skills You’ll Need

Now, in order to customize Thesis 2.1 with PHP you really do need a couple of tools to do this correctly. Really at a minimum, you need a code editor and you need to have your FTP system set up. While in Thesis 2.1 you can do all the CSS and HTML you want inside of the Skin Editor, there’s no facility for you to edit PHP that way and that’s a good thing.

Code Editor

I’ll be using NetBeans as my code editor and it checks errors as I go along and it has syntax highlighting and I like it very much. There are lots of other code editors out there but the worst possible thing you can do is be a beginner and try to write some code with a plain text editor so I strongly recommend you look at that.

If you don’t have any idea which direction to turn, then I recommend you look at my Tools of the Trade videos, I have a whole series on installing NetBeans and using NetBeans. NetBeans is free and you’ll undoubtedly find NetBeans that it will do the job for you quite well.

FTP/File Locations

The same thing is true with FTP, this is not something to do if you struggle with FTP. You need to understand where your files are located on your computer and be able to jump around from file location to file location on your computer.

You need to be able to understand where the files are on your server and properly identify those things and then make the connection between your computer and your server with FTP. If you struggle with that, that’s something you have to master before you try to do this because that’s an essential skill set. You can find tutorials on using FTP on my site if you need to learn more about that.

Concepts Learned Here Apply to Any Custom Coding

We’re talking about this in the terms of excerpt length and “Read More” link for Thesis 2.1 but really, the concepts here are applicable to any kinds of custom coding that you may want to do. So for example, you may want to create custom secondary loops or maybe a related posts widget or related post box.

You may want to create custom functions based on user rules because you’re using a membership plugin and you want to do some things like that. You may want to create functions based on custom post meta. Really, anything that you would use custom PHP for can be used doing this.

The functions you learn how to create in this introduction to customizing PHP in Thesis 2.1 are intended to be guide for how you might incorporate custom PHP in your own work.

If you’re coming to this from Thesis 1.8.5 and this is really your first foray into Thesis 2.1 then you’ll be surprised to learn how much PHP is taken care of for you. Most of the work you used to do with PHP, you don’t have to do anymore because the Skin Editor makes the HTML arrangement in custom templates.

There’s so much less that you have to do with PHP in Thesis 2.1 but anything that you find you have to do with PHP you can use the strategies you learn here to apply that.

0 Comments… add one
0 comments… add one

Leave a Comment