O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

What You Don't Know You Can Do -- WordPress Development for Absolutely Everyone!

7.609 visualizações

Publicada em

Do you think tapping into “advanced” WordPress functionality is only for developers? Power users and designers can build a site that takes advantage of all that WordPress has to offer. Learn about Templates, Custom Post Types, Custom Taxonomies, The Loop, Hooks, Actions & Filters and how power users and designers can use them to build a great site with custom functionality.

Publicada em: Tecnologia, Negócios
  • Seja o primeiro a comentar

What You Don't Know You Can Do -- WordPress Development for Absolutely Everyone!

  1. 1. What You Don't Know You Can Do — WordPress Development for Absolutely Everyone Tracy Levesque • •@LilJimmi tracy@yikesinc.com WhatYouDon'tKnowYouCanDo WordPressDevelopmentfor AbsolutelyEveryone With Tracy Levesque / @liljimmi
  2. 2. Hi, I'm Tracy.
  3. 3. I amaPowerUser
  4. 4. I know HTML
  5. 5. I know CSS
  6. 6. I don't know PHP
  7. 7. There are many folks with skill sets similar to mine. And we can develop for WordPress, too!
  8. 8. WordPressDevelopment Demystified!I'm going to go through some terms being thrown around on that other track and explain what they are, what they can do, and how to use them.
  9. 9. The WordPress Template Hierarchy
  10. 10. The WordPress Template Hierarchy codex.wordpress.orgsays: WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page.
  11. 11. The WordPress Template Hierarchy Translation Templates are cool because if you name a template file a certain way, it will automatically apply to a certain page. There's a that shows how the naming conventions work. chart on WordPress.org
  12. 12. OMG
  13. 13. The WordPress Template Hierarchy Whatitis The chart looks confusing, but it's really pretty simple.
  14. 14. The WordPress Template Hierarchy Whatitis Templates are the files in a theme that tell WordPress how to display your pages. They live in the theme's folder.
  15. 15. The WordPress Template Hierarchy They'relikedifferentframesforyourcontent
  16. 16. The WordPress Template Hierarchy Whatitis Templates handle the display of different pages on your WordPress site such as... The main list of posts (the blog page) A regular page An archive page (Category, Tag, Author, Date pages) A single post page The search results page Etc...
  17. 17. The WordPress Template Hierarchy Whatitcando If you name template files a certain way they will affect the display of those pages.
  18. 18. The WordPress Template Hierarchy Twentytwelveexample
  19. 19. The WordPress Template Hierarchy Howyoucanuseit Power users - Look for a theme or theme framework that allows you to add/modify templates. Designers - Make them yourself! Just follow the chart.
  20. 20. The Loop
  21. 21. The Loop codex.wordpress.orgsays: The Loop is PHP code used by WordPress to display posts.
  22. 22. The Loop Translation The Loop is a set of instructions in a template that grabs content and displays it on a page. It's called a "loop" because the set of instructions can be repeated multiple times on a page.
  23. 23. The Loop TheLoopislikemakingsandwiches.
  24. 24. The Loop To makeasandwichyoucollectasetof ingredients andassembleit
  25. 25. The Loop Yourepeatthestepsof collectingandassemblingas manytimesasneeded
  26. 26. The Loop Whatitis Within The Loop are the main parts of a page or post. These are like the slices of bread in our sandwich. Title Content
  27. 27. The Loop Whatitis You can also grab additional content, aka Metadata, attached to pages or posts. These are like the ingredients in our sandwich. Author Date Featured Image Categories (posts only) Tags (posts only) Etc.
  28. 28. The Loop Whatitis In The Loop you can provide instructions that determine which posts are shown. For example we could have the following instructions: Only show posts from the "Pets" category If a post is tagged "kittens" add a special style to it If a post is tagged "dogs" don't show it
  29. 29. The Loop Whatitcando Custom loop example on the site.moviefanfare.com
  30. 30. The Loop Howyoucanuseit Power users - Look for a theme, theme framework or plugin that allows you to modify the display of the posts page. Designers - Dig into the loop in your theme or child theme and start modifying! Check out in the WordPress Codex.The Loop in Action
  31. 31. Custom Post Types
  32. 32. Custom Post Types codex.wordpress.orgsays: A Custom Type is a Post Type you define.
  33. 33. Custom Post Types Translation Normally you only have 2 types of content to choose from: Pages and Posts. Guess what — you can make more!
  34. 34. Custom Post Types Whattheyare Pages and Posts are both Post Types. They... Are types of content with their own sets of fields Have their own admin area in the WordPress admin Let you add content in a repeating and consistent manner Have a consistent layout (by default) on the front-end of your site.
  35. 35. Custom Post Types Whattheyare So instead of just You could have
  36. 36. Custom Post Types Really,thepossibilitiesareendless
  37. 37. Custom Post Types Whattheycando Custom Post Types can also have their own custom taxonomies. That just means they can have their own ways to group posts together. Categories and Tags are taxonomies for Posts and Pages.
  38. 38. Custom Post Types Whattheycando If we created a custom post type called "Movies" some custom taxonomies we could use are Genre, Year, Director and Rating With these custom taxonomies you would have archive pages to see all movies by genre, year, etc.
  39. 39. Custom Post Types StaticGuardexample For we created 3 custom post types: Products, Stylists and Tips mystaticguard.com
  40. 40. Custom Post Types StaticGuardexample With Custom taxonomies, The Loop and the WordPress Template Hierarchy, the site is easy-to-manage.
  41. 41. Custom Post Types Howyoucanusethem Power users - that allows you to create Custom Post Types. Use a plugin Designers - Code your own. Really! I have that shows you how.a how-to video on WordPress.tv
  42. 42. Hooks, Actions and Filters
  43. 43. Hooks, Actions and Filters codex.wordpress.orgsays: Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress...There are two kinds of hooks: Actions: A custom PHP function defined in your plugin (or theme) and hooked, i.e. set to respond, to specific events that take place in WordPress. Filters: Functions that WordPress passes data through, at certain points in execution, just before taking some action with the data
  44. 44. Hooks, Actions and Filters Translation Hooks, Actions and Filters allow you to change WordPress functionality without breaking it.
  45. 45. Custom Post Types Whattheyare Hooks - Points at which WordPress allows you to tap into a function and safely modify it. Some examples are: Changing the length of the excerpt Changing the order of menu items in the admin Adding content to the beginning or end of every post Adding Custom Post Types Adding Sidebars
  46. 46. Hooks, Actions and Filters Whattheyare Actions - A hook that makes something new happen when a WordPress function is triggered.
  47. 47. Hooks, Actions and Filters Whattheyare Filters - A hook that modifies a WordPress function when it is triggered.
  48. 48. Hooks, Actions and Filters Whattheyare Now is when I do my awesome, visual illustration of Hooks, Actions and Filters using a volunteer from the audience.
  49. 49. Hooks, Actions and Filters What they can do Hooks, Actions and Filters are what makes WordPress great software for building an amazing site.
  50. 50. Hooks, Actions and Filters Howyoucanusethem Power users - If you've ever installed a plugin you are using them already. Designers - Dig into the and start adding functionality to your themes. WordPress Codex article on Theme Development
  51. 51. Resources - The #1 place to find the best WordPress development information. - From the Codex - A handy site that creates CPT code for you. - A list of theme frameworks that allow power users to create extended functionality for WordPress. The WordPress Codex WordPress Terminology Related to Design WordPress Custom Post Type Generator Guide to WordPress Theme Frameworks
  52. 52. THE END Questions? Slides available on Slideshare: slideshare.net/TheTracyL