Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty

1,059 views

Published on

My Slides from #WCSyd.

Published in: Technology
  • Be the first to like this

A Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty

  1. 1. … A N D G E T T I N G YOU R H A N D S D I RT Y A B E G I N N E R ’ S G U I D E T O P O P P I N G T H E B O N N E T… S C O T T H U N T L E Y
  2. 2. I A M N O T A B L O G G E R Okay, sure, I write articles from time to time for TAFEbytes, a blog by TAFE teachers. 8 articles in 15 months, that’s not too bad. I suppose you could say I run my wife’s photoblog (CLHuntleyPhotography.com) We just got around to posting our Floriade photos. Floriade 2013, that is.
  3. 3. I A M N O T A D E V E L O P E R I was writing this very cool SmartTour Web App in PHP… …in 2010. I never finished it. It didn’t use WordPress as the backend* *but I have been so totally inspired to redo this project using WordPress as the backend, I just haven’t found the time
  4. 4. I A M N O T A D E V E L O P E R I haven’t written any plugins* or any themes. *I have been so totally inspired to write a plugin for my wife’s photoblog, I just haven’t found the time.
  5. 5. S O T H E N W H O T H E H E L L A M I ? A N D W H Y A M I P R E S E N T I N G AT W O R D C A M P ? “Those who can, do; those who can't, teach.” - George Bernard Shaw “Actually Mr. Shaw, it’s teaching and assessing.” - Kenneth Scott Huntley I’m a teacher at Miller College, South Western Sydney Institute of TAFE
  6. 6. S O T H E N W H O T H E H E L L A M I ? A N D W H Y A M I P R E S E N T I N G AT W O R D C A M P ? I’m a teacher at Miller College, South Western Sydney Institute of TAFE • Social Media • HTML & CSS, even a little jQuery • Customise Content Management Systems • ICAWEB416A Customise content management system • ICAWEB507A Customise a complex IT content management system • And specifically, we use WordPress!
  7. 7. W H O I S T H E T Y P I C A L M I L L E R S T U D E N T ? A N D H O W M I G H T T H I S M AY A P P LY T O Y O U ? Certificate IV and Diploma of IT General • This means they learn a little bit of every thing • Thus, they are not programmers • They learn a little VisualBasic <Insert audible gasps and much dissatisfaction from the crowd here>
  8. 8. W H O I S T H E T Y P I C A L M I L L E R S T U D E N T ? A N D H O W M I G H T T H I S M AY A P P LY T O Y O U ? So, they don’t know how to code in PHP. But they have to customise a Content Management System. Can you mod WordPress knowing almost no PHP? Can I teach you some simple WordPress mods that will give you confidence to mod the PHP? And can I do it in 45 minutes?
  9. 9. W H E N Y O U A S S U M E … Let’s assume that you know… …what an if statement is. …what a while loop is. …what a variable is. That’s all you need to know.
  10. 10. W H E N Y O U A S S U M E … In all seriousness, in this presentation is not going to be code heavy. In the demos, I’ll put some PHP code up on screen. I’ll talk you through what the code is doing. And I’ll show you where to put the code. The point of this presentation is to show you that you don’t have to be a code monkey to do some basic mods to your code.
  11. 11. C T R L - Z ! C T R L - Z ! C T R L - Z ! This should go without saying but… …let’s not play with a live site. Like your live site. The one you’ve been putting lots of work into. The one that you can’t afford to break. Let’s build a sandbox site instead.
  12. 12. W H AT T H E FA M O U S F I V E M I N U T E I N S TA L L S K I P S . . . Our first mod isn’t really a mod. The famous five minute install skips adding salts. Let’s mess with our wp-config.php a little…
  13. 13. T H I S S E M E S T E R ’ S A S S I G N M E N T In our Diploma course, I randomly assign the students a simulated client. They then have to customise a WordPress blog for their client. Let’s take a look at some of the tasks I’m asking the current group of disinterested pupils aspiring scholars to undertake.
  14. 14. T H I S S E M E S T E R ’ S A S S I G N M E N T Task 3: You are required to create a child theme based on either the theme Twenty Twelve, Twenty Thirteen, or Twenty Fourteen.
  15. 15. T H I S S E M E S T E R ’ S A S S I G N M E N T Task 4: Modify the Dashboard. Specifically, you are to: a. Add your client’s logo to the Login Screen b. Add a custom dashboard widget that welcomes them to the CMS, and provides your contact details (email address, phone number) for them to contact you if they need support.
  16. 16. T H I S S E M E S T E R ’ S A S S I G N M E N T Task 5: Your client has requested “upcoming events” functionality for their blog. To implement this feature, you have decided to create a Custom Post Type for Events.
  17. 17. C H I L D T H E M E S What is a Child Theme? According to the WordPress Codex: “A child theme is a theme that inherits the functionality of another theme, called the parent theme. Child themes allow you to modify, or add to the functionality of that parent theme. A child theme is the best, safest, and easiest way to modify an existing theme, whether you want to make a few tiny changes or extensive changes. Instead of modifying the theme files directly, you can create a child theme and override within.” http://codex.wordpress.org/Child_Themes
  18. 18. C H I L D T H E M E S A N D C U S T O M C S S What is the best way to modify a theme’s CSS? In this demo, we’ll create a child theme, and write some ugly CSS. (And do something useful, like making part of their theme disappear.)
  19. 19. A D D I N G O U R L O G O T O T H E L O G I N S C R E E N It’s always a nice touch for our client’s to see their logo in the login screen. This isn’t too hard. In this demo, we’ll modify functions.php.
  20. 20. A D D A C U S T O M D A S H B O A R D W I D G E T Next, we are required to add a custom dashboard widget. • In our case, to include our contact details. • Maybe there’s something else you might want to add to the backend of your blog? In this demo, we’ll create a plugin that adds a dashboard widget.
  21. 21. C U S T O M P O S T T Y P E S I promised to show some custom post types too. But then the schedule for WordCamp was published…
  22. 22. C U S T O M P O S T T Y P E S Mastering Custom Post Types by Ajax McKerral (Sunday 12:15) “Getting to the bottom of creating custom post types, and how this can benefit your clients. Learn how to declare them, label them, add taxonomies and make them navigable in the Dashboard. Then learn how to build templates for them and take full advantage of core WordPress functionality to make yours and your client’s life easier.” …and I saw this. ! I don’t want to be repetitive. ! It looks like Ajax’s presentation will cover this topic in more depth.
  23. 23. S O I N S T E A D … Let’s put an ad after the first post. In this demo, we will modify the WordPress loop.
  24. 24. S O WA S T H I S H A R D ? No. These tasks were all taken from tutorials published online (and with a little help from the WordPress codex). • Look for these tutorials • Don’t be intimidated by them • You don’t need to be a code monkey to work through a WordPress tutorial. Or book. Or whatever. • A good tutorial will talk you through the code… • …and maybe even set you on the path to becoming a code monkey.
  25. 25. Follow me on Twitter: @MillerTAFEScott Tweet WordCamp: #wcsyd Join the local Meetups: www.meetup.com/WordPress-Sydney ! ! Credits: Guillaume Voisin How to Build Custom Dashboard Widgets http://goo.gl/oGNYk9 Conor Turnbull 12 Useful Customization and Branding Tweaks for the WordPress Dashboard http://goo.gl/9eLDJv Harish Chouhan Customizing the WordPress Dashboard For Your Clients http://goo.gl/VHGmxD Jean-Baptiste Jung 10 Useful WordPress Loop Hacks http://goo.gl/gzYtgd Photo by Duncan Miller Photography https://flic.kr/p/7Z25ev

×