It was great having Andy come in and speak to the class. While I didn’t grasp every single thing he was talking about, I now have a better understanding of the capabilities of WordPress. His discussion about child themes was especially useful for me. I’m happy he listed the 3-4 parent (and very basic) themes he recommends for creating child themes. I initially was thinking about using a very complex theme for my site, but I have now decided to go the more simple route with a theme called magazine basic.
After downloading my new theme, I spent some time looking through the various code and browsing the admin section. Since I’m creating a child theme, I know I definitely will have to create a new directly that includes a style.css file. But what about the other parent theme folders? Do I only drag the ones I want to edit into the child theme directory? I know I want to create a custom post type, which will be done through code, but what file do I create the code in?
I also spent some time trying to understand the differences between the local server and the web server, and how they “talk” to each other – for lack of a better word. I successfully connected to my local server and starting making very minor changes through the Admin section and was able to instantly view the changes on my local site (which was pretty cool!). But I’m having difficulty being able to view the changes on the web (even though I commit/synced files on GitHub and successfully connected to Cyberduck). Is it because I made changes through the Admin and not the code? My new theme is showing up, just not the text changes I made.
Ah.. so many questions still… but finally feel like I’m starting to comprehend what I’m doing.
It appears that I successfully created a child theme for my site. This was actually much easier than I anticipated. In a nutshell, I created a new directory in my themes folder called magzine-basic-child. I also created a style.css file with the following details:
Theme Name: Magazine Basic Child
Theme URI: http://themes.bavotasan.com/our-themes/basic-themes/magazine-basic
Description: Child Theme for Magazine Basic theme
Author: Susan V
Author URI: http://themes.bavotasan.com/
Next, I copied the css code from the parent theme into my child theme css doc and starting making very minor edits, such as changing the background color of the navigation bar. Although terrified at this point that I was messing everything up, I got the courage to Comment/Commit/Snyc on GitHub — and voila! My basic twenty twelve theme instantly turned into a different basic theme with a maroon-colored nav bar.
Now if I could only get my local site and website to look the same….
Yup, that’s right! All you need to do is create a new style.css and — if desired — import the original CSS file. You only need to add files or code for aspects you want to override.
As for the difference between what’s appearing on your local server and web server, yes, making changes in the admin aren’t synced when you drag files to FTP because admin changes (such as settings) are stored in the database.
As for where to register the custom post type, you could do it in the functions.php file or — and I’d recommend this second option — in a plugin. A plugin is better because you’re abstracting functionality from the theme, which can then be used by others interested in storing wines on their site.
This plugin is a good example: