• Save
WordPress Tips & Tricks
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

WordPress Tips & Tricks

  • 1,950 views
Uploaded on

Presentation at Houston Website & Graphic Design Seminar 2011

Presentation at Houston Website & Graphic Design Seminar 2011

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,950
On Slideshare
1,510
From Embeds
440
Number of Embeds
3

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 440

http://www.houstoninternetmarketing.com 436
url_unknown 3
http://translate.googleusercontent.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Jared  Atchison    /    jaredatchison.com    /    @jaredatch  
  • 2. Wait,  who?  
  • 3. Wait,  who?  —  2008  Texas  A&M  Graduate  (Technology  Management)  —  M-­‐F,  8-­‐5pm:  Texas  Transportation  Institute   —  WordPress!  —  Independent  WordPress  Developer/Consultant   —  Genesis!  —  ThemeGarden  Author  http://www.themegarden.com/jared-­‐atchison/  —  Featured  StudioPress  Developer  http://dev.studiopress.com/developers/jared-­‐atchison  —  Theme  frameworks++    
  • 4. Common  Mistakes  
  • 5. Adding  JavaScript  to  themes  wp-­‐content/themes/YourTheme/header.php  
  • 6. Adding  JavaScript  to  themes  wp-­‐content/themes/YourTheme/functions.php   —  Still  not  ideal   —  Can  be  useful  (e.g.  TypeKit)  
  • 7. Adding  JavaScript  to  themes  wp_enqueue_script()  -­‐  http://codex.wordpress.org/Function_Reference/wp_enqueue_script    wp_register_script()  -­‐  http://codex.wordpress.org/Function_Reference/wp_register_script      
  • 8. Adding  JavaScript  to  themes  
  • 9. WP  packaged  jQuery    —  WordPress  ships  with  jQuery  (1.4.2)   —  /wp-­‐includes/js/jquery/jquery.js  —  wp_enqueue_script(‘jquery’);  —  Most  often  replaced  with  copy  from  Google  CDN   —  https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js  
  • 10. WP  packaged  jQuery    WHY  REMOVE?  —  Wants/needs  the  newest  version  (e.g.  1.4.4)  —  Wants  to  be  on  CDN  (content  delivery  network)   —  “decreased  latency,  increased  parallelism,  and  better  caching.”   —  http://encosia.com/2008/12/10/3-­‐reasons-­‐why-­‐you-­‐should-­‐let-­‐google-­‐host-­‐jquery-­‐for-­‐you/  —  WTFBBQ!!  jQuery.noConflict();  -­‐  no  conflict  mode   —  http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers   —  http://docs.jquery.com/Using_jQuery_with_Other_Libraries  —  Doesn’t  understand/use  wp_enqueue_script();    
  • 11. WP  packaged  jQuery    WHY  NOT  REMOVE?  —  Adding  JS  the  wrong  way  (first  point)  can  cause  chaos.   —  Duplicate  jQuery  includes,  OH  NOES!   —  ThemeForest.net  …  *face  palm*  —  Public  CDN  not  always  “be  all  and  end  all”.   —  Relying  on  Google   —  Look  into  W3  Total  Cache  —  Cross  library  compatibly  often  lost  (no  conflict)  
  • 12. WP  packaged  jQuery     IF  NEEDED,  DO  IT  CORRECTLY  :)    http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-­‐default_location    
  • 13. WP  packaged  jQuery    WORKING  WITH  NO  CONFLICT  —  Virtually  all  popular  jQuery  scripts  work  in  NC   mode    —  Yours  can  too!  Use  long-­‐hand  document  ready…    
  • 14. Including  files  —  Can  be  done  many  different  ways  (successfully).  —  Certain  methods  for  certain  situations  —  include();  —  require_once();  —  get_header();  get_sidebar();  and  get_footer()  —  get_template_part();  Since  3.0  
  • 15. Using  Permalinks  —  WordPress  gives  great  permalink  control  —  You  can  do  almost  anything  –  but  should  you?  —  ZOMG!  BUT  SEO!!!!!   —  Lies.   —  http://www.weberz.com/blog/2009/06/seo-­‐experts-­‐give-­‐wrong-­‐advice-­‐wordpress-­‐permalinks  —  Do  not  start  permalinks  with     %category%  or  %postname%  —  Pages  +  non-­‐numerical  starting  permalinks  =  tons  extra   rules  —  Custom  post  types  excluded  
  • 16. Using  Permalinks  “Use  a  permalink  structure  that  does  not  start  with  a  text  based  variable.    By  doing  this  you  will  drastically  reduce  your  risk  of  the  problems  listed  above.    Here  is  a  list  of  variables  you  can  use  that  are  not  text  based:”  %year%  –  The  year  of  the  post,  four  digits,  for  example  2004  %monthnum%  –  Month  of  the  year,  for  example  05    %day%  –  Day  of  the  month,  for  example  28    %hour%  –  Hour  of  the  day,  for  example  15    %minute%  –  Minute  of  the  hour,  for  example  43    %second%  –  Second  of  the  minute,  for  example  33    %post_id%  –  The  unique  ID  #  of  the  post,  for  example  423      Further  Reading:  http://ottopress.com/2010/category-­‐in-­‐permalinks-­‐considered-­‐harmful/  Thanks  to  Josh  and  Bill    
  • 17. Building  a  theme  —  Don’t  start  from  scratch  unless  you  must  —  Build  on  top  of  something  proven!  —  “Blank”  themes:  Whiteboard,  Sandbox,  Starkers,  etc  —  Frameworks:  Genesis!,  Canvas,  Builder,  Hybrid,  Headway,   Thematic  —  On  top  of  popular  themes:  Twenty  Ten  —  Beware  of  Kubrick!  —  http://wpcandy.com/presents/wordpress-­‐theme-­‐framework-­‐comparison    
  • 18. Troubleshooting  (do  it)  —  Errors?  Warnings?  Notices?  White-­‐screen-­‐of-­‐death?  —  DON’T  PANIC.  Deep  breaths.  Debug!  —  Most  problems  you  can  debug  yourself.  —  define(WP_DEBUG,  true);  —  Deactivate  plugins  —  Deactivate  themes  
  • 19. Getting  Help  —  Know  where  to  go  for  help.  All  sources  are  not  equal!  —  Codex  (  http://codex.wordpress.org)  —  WordPress  forums/support  (http://wordpress.org/support/)  —  Twitter  e.g.  #wordpress  (hit  or  miss)  —  IRC,  #wordpress  on  irc.freenode.net   —  http://codex.wordpress.org/IRC  —  “3rd  party”  WP  Tavern,  StudioPress  forums,  Google,  etc  
  • 20. Staying  informed  —  Twitter,  #wordpress   —  http://twitter.com/#!/jaredatch/wordpress  —  Mailing  lists,  wp-­‐testers,  wp-­‐hackers  –  with  caution!  —  Follow  weekly  developer  meetings  (IRC)   —  http://wpdevel.wordpress.com/  —  Read  developer  blogs    
  • 21. Helpful  WordPress  sites  —  WP  Candy   —  Dougal  Campbell  —  WP  Tavern   —  Lorelle  —  Bill  Erickson   —  Scribu  —  Stephanie  Leary   —  Matt  Mullenweg  —  Yoast   —  Justin  Tadlock  —  Ottopress   —  Alex  Mills   (Viper007Bond)  —  Mark  Jaquith   —  Andrew  Nacin  
  • 22. Jared  Atchison    /    jaredatchison.com    /    @jaredatch