Your SlideShare is downloading. ×
0
WordPress and PHPwith Lorelle VanFossen
 25% of all sites on the web are published on WordPress The latest version of WordPress has been downloaded almost 20  m...
• The core of WordPress is built on PHP• WordPress Themes:  • WordPress Template Tags: Make WordPress go  • WordPress Temp...
• Ingredients:  •   6 cups HTML/XHTML/HTML5  •   8 cups CSS/CSS3  •   1/2 cup JavaScript  •   12 cups PHP  •   7 cups Word...
<?php bloginfo(name); ?><?php bloginfo(description); ?>    <?php bloginfo(url); ?> <p>Powered by WordPress version<?php bl...
Clickable header<div id="header">     <a href="<?php bloginfo(url); ?>"title="<?php bloginfo(name); ?> - <?phpbloginfo(des...
<?php the_title(); ?>Parameters:<?php the_title(before, after, display); ?><h2><?php the_title(Post Title: ,  &raquo;); ?>...
Boolean Template Tags connect multiple paramters together<?php wp_list_categories( $args ); ?><ul><?phpwp_list_categories(...
<?phpget_header();if (have_posts()) :      while (have_posts()) :           the_post();           the_content();      endw...
<?phpget_header();if (have_posts()) :      while (have_posts()) :           the_post();           the_content();      endw...
<!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if t...
<!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if t...
<!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if t...
<!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if t...
• Modular elements create a WordPress Theme• Code and data called with template tags, functions,  conditional tags, and po...
Child Themesfunctions.php template fileWordPress Plugins
• Protect original files• Allow protected customization• Use CSS !important inheritance.  • Child Theme code overrides Par...
• Template file strictly for adding code customization.• Uses WordPress Hooks to extend:  • Parent Theme elements  • WordP...
• Add options to Administration Panels  (backend)  • Theme options  • Change user interface  • Add functionality
Power of WordPress ThemesTwenty-Eleven WordPress ThemeBuilt-in Customizations
• Extend WordPress Theme design and functionality• Preserve function with Theme switches• Extend WordPress Administration ...
NextGEN GalleryMy Blog’s Building Blocks                     BuddyPress                                   XML Sitemap     ...
Talk Like a Pirate Day                    September 19, 2012                    Text Filter Suite                    WordP...
This Plugin is useful for those that wanttheir blog to out-live them, and serve asan online memorial. Even without use oft...
The Events CalendarWordPress Plugin
• Designed for newsroom editorial workflow.• Tracks content to visualize content and priorities.
Customizable Post Listings                 Customizable                  Comment                   Listings
Customizable Post Listings
phpMyAdmin WordPress Plugin
http://lorelle.wordpress.com/2007/02/06/a-love-letter-to-wordpress-plugin-authors/
A New Plugin For Your New WordPress VersionThe latest WordPress version was launched. Yes,WordPress 3.0 was already availa...
Best Blogroll WordPress PluginAllows customization of the blogroll orsidebar links.
Embrace Code Standards
• Test in variety of environments and start early.• TEST TEST TEST TEST TEST.• Know your licenses (understand GPL thorough...
• Prepare for feedback  • Your site clearly shows links to Plugins and expertise  • WordPress Plugin Directory  • WordPres...
The WordPress Codex is your friend       http://codex.wordpress.org/
Nine APIs in WordPress
•   Code, Web, and Accessibility Standards•   PHP 5+•   JavaScript, AJAX, jQuery•   Apache/Unix basics•   HTML/CSS•   XML•...
• Only full college credit WordPress course in the world.• Overview of WordPress publishing and content  management platfo...
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
Upcoming SlideShare
Loading in...5
×

WordPress and PHP - It Takes One to Know One

17,868

Published on

Lorelle VanFossen presents "WordPress and PHP," a quick review of how WordPress uses PHP from the core to design to WordPress Plugins. Presented originally at Clark College in Vancouver, Washington, for their PHP class, this presentation helps students understand the importance of PHP in WordPress. It also features the skill sets critical to learning WordPress from a coding and design perspective, and what it takes to become a WordPress developer and designer.

Published in: Education, Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
17,868
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
47
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress and PHP - It Takes One to Know One"

  1. 1. WordPress and PHPwith Lorelle VanFossen
  2. 2.  25% of all sites on the web are published on WordPress The latest version of WordPress has been downloaded almost 20 million times. Median hourly wage of a WordPress project is $50. Typical salary range for US web industry position with WordPress dev/design experience is $55-74K. Mobile experience, add $5-10K. oDesk reports an average of 5,500 WordPress jobs posted a month. WordPress runs The New York Times, Wall Street Journal sites, Ford, NY University Library, CNN, Harvard Law School, Ben & Jerry, People Magazine, NASA, Time Magazine, GE, MTV Newsroom, BBC Top Gear, National Geographic, TechCrunch, BoingBoing, AIGA Portland, The Economist, Comedy.com, Mozilla, Wired, Samsung, Le Monde Newspaper, Lexus, Nikon Pressroom, Official Star Wars Blog, Kobe Bryant, Carnival Cruise Line, Jay-Z…
  3. 3. • The core of WordPress is built on PHP• WordPress Themes: • WordPress Template Tags: Make WordPress go • WordPress Template Files: Make WordPress pretty • WordPress Functions.php file: Code in Design• WordPress Plugins • Push the boundaries of WordPress • Separate code from design
  4. 4. • Ingredients: • 6 cups HTML/XHTML/HTML5 • 8 cups CSS/CSS3 • 1/2 cup JavaScript • 12 cups PHP • 7 cups WordPress Template Tags • 1 tablespoon common senseMix all ingredients into WordPress Template Files. AddMySQL data and process through the WordPress Loop.Add code from the functions.php file. Mix well. Season withWordPress Plugins and GPL.
  5. 5. <?php bloginfo(name); ?><?php bloginfo(description); ?> <?php bloginfo(url); ?> <p>Powered by WordPress version<?php bloginfo(version); ?></p>Powered by WordPress version 3.4
  6. 6. Clickable header<div id="header"> <a href="<?php bloginfo(url); ?>"title="<?php bloginfo(name); ?> - <?phpbloginfo(description); ?>"> <?php bloginfo(name); ?> </a></div> <a href="http://lorelle.wordpress.com/" title="Lorelle on WordPress – WordPress Tips">Lorelle on WordPress</a>
  7. 7. <?php the_title(); ?>Parameters:<?php the_title(before, after, display); ?><h2><?php the_title(Post Title: , &raquo;); ?></h2> Post Title: Anatomy of a Template Tag »
  8. 8. Boolean Template Tags connect multiple paramters together<?php wp_list_categories( $args ); ?><ul><?phpwp_list_categories(orderby=name&include=3,5,16); ?></ul>
  9. 9. <?phpget_header();if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile;endif;get_sidebar();get_footer();?>
  10. 10. <?phpget_header();if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile;endif;get_sidebar();get_footer();?>
  11. 11. <!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if the current post is in category 3. If it is, the div box is given the CSS class "post-cat-three". Otherwise, the div box will be given the CSS class "post". --> <?php if ( in_category(3) ) { ?> <div class="post-cat-three"> <?php } else { ?> <div class="post"> <?php } ?> <!-- Display the Title as a link to the Posts permalink. --> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?phpthe_title(); ?></a></h2><!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --><small><?php the_time(F jS, Y) ?> by <?php the_author_posts_link() ?></small><!-- Display the Posts Content in a div box. --><div class="entry"> <?php the_content(); ?></div><!-- Display a comma separated list of the Posts Categories. --><p class="postmetadata">Posted in <?php the_category(, ); ?></p></div> <!-- closes the first div box --><!-- Stop The Loop (but note the "else:" - see next line). --><?php endwhile; else: ?><!-- The very first "if" tested to see if there were any Posts to display --><p>Sorry, no posts matched your criteria.</p><!-- REALLY stop The Loop. --><?php endif; ?>
  12. 12. <!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if the current post is in category 3. If it is, the div box is given the CSS class "post-cat-three". Otherwise, the div box will be given the CSS class "post". --> <?php if ( in_category(3) ) { ?> <div class="post-cat-three"> <?php } else { ?> <?php } ?> <div class="post"> WordPress Function Tags <!-- Display the Title as a link to the Posts permalink. --> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?phpthe_title(); ?></a></h2><!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --><small><?php the_time(F jS, Y) ?> by <?php the_author_posts_link() ?></small><!-- Display the Posts Content in a div box. --><div class="entry"> <?php the_content(); ?></div><!-- Display a comma separated list of the Posts Categories. --><p class="postmetadata">Posted in <?php the_category(, ); ?></p></div> <!-- closes the first div box --><!-- Stop The Loop (but note the "else:" - see next line). --><?php endwhile; else: ?><!-- The very first "if" tested to see if there were any Posts to display --><p>Sorry, no posts matched your criteria.</p><!-- REALLY stop The Loop. --><?php endif; ?>
  13. 13. <!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if the current post is in category 3. If it is, the div box is given the CSS class "post-cat-three". Otherwise, the div box will be given the CSS class "post". --> <?php if ( in_category(3) ) { ?> <div class="post-cat-three"> <?php } else { ?> <div class="post"> <?php } ?> <!-- Display the Title as a link to the Posts permalink. --> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?phpthe_title(); ?></a></h2><!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --><small><?php the_time(F jS, Y) ?> by <?php the_author_posts_link() ?></small><!-- Display the Posts Content in a div box. --><div class="entry"> <?php the_content(); ?></div><!-- Display a comma separated list of the Posts Categories. --><p class="postmetadata">Posted in <?php the_category(, ); ?></p></div> <!-- closes the first div box --><!-- Stop The Loop (but note the "else:" - see next line). --><?php endwhile; else: ?><!-- The very first "if" tested to see if there were any Posts to display --><p>Sorry, no posts matched your criteria.</p><!-- REALLY stop The Loop. --><?php endif; ?>
  14. 14. <!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- The following tests if the current post is in category 3. If it is, the div box is given the CSS class "post-cat-three". Otherwise, the div box will be given the CSS class "post". --> <?php if ( in_category(3) ) { ?> <div class="post-cat-three"> <?php } else { ?> <div class="post"> <?php } ?> <!-- Display the Title as a link to the Posts permalink. --> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?phpthe_title(); ?></a></h2><!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --><small><?php the_time(F jS, Y) ?> by <?php the_author_posts_link() ?></small><!-- Display the Posts Content in a div box. --><div class="entry"> <?php the_content(); ?></div><!-- Display a comma separated list of the Posts Categories. --><p class="postmetadata">Posted in <?php the_category(, ); ?></p></div> <!-- closes the first div box --><!-- Stop The Loop (but note the "else:" - see next line). --><?php endwhile; else: ?><!-- The very first "if" tested to see if there were any Posts to display --><p>Sorry, no posts matched your criteria.</p><!-- REALLY stop The Loop. --><?php endif; ?>
  15. 15. • Modular elements create a WordPress Theme• Code and data called with template tags, functions, conditional tags, and post queries• Automatic and customizable hierarchy header.php  If pageview is single and in category 3, show sidebar 2. index.php  If pageview is category, show sidebar 3 single.php  If pageview is front, show sidebar on sidebar. left. page.php category.php php  If category view requested, archive.php automatically switch to category template file. footer.php
  16. 16. Child Themesfunctions.php template fileWordPress Plugins
  17. 17. • Protect original files• Allow protected customization• Use CSS !important inheritance. • Child Theme code overrides Parent Theme code.• Child Theme customization lost with Theme change.
  18. 18. • Template file strictly for adding code customization.• Uses WordPress Hooks to extend: • Parent Theme elements • WordPress Administration Screens• Attaches to specific Theme, not all Themes.• Theme functions.php lost when changing Themes.<!– - Set excerpt length from default to 200 words - - >function custom_excerpt_length( $length ) { return 200;}add_filter( excerpt_length, custom_excerpt_length,999 );
  19. 19. • Add options to Administration Panels (backend) • Theme options • Change user interface • Add functionality
  20. 20. Power of WordPress ThemesTwenty-Eleven WordPress ThemeBuilt-in Customizations
  21. 21. • Extend WordPress Theme design and functionality• Preserve function with Theme switches• Extend WordPress Administration Screens
  22. 22. NextGEN GalleryMy Blog’s Building Blocks BuddyPress XML Sitemap Generator @lorelleonwp WordPress.com Stats
  23. 23. Talk Like a Pirate Day September 19, 2012 Text Filter Suite WordPress Plugin WRP-Cards WordPress Plugin US Department of Homeland Insecurity Idiocy Level for WordPress Suicide Squirrel Threat Advisory System Related Ways to Take Action CSS Naked DayWordPress PluginAnnually in April
  24. 24. This Plugin is useful for those that wanttheir blog to out-live them, and serve asan online memorial. Even without use ofthis Plugin, all are recommended tomake sure someone can handle theirwebsite in case of emergency.Tags: afterlife, death, will
  25. 25. The Events CalendarWordPress Plugin
  26. 26. • Designed for newsroom editorial workflow.• Tracks content to visualize content and priorities.
  27. 27. Customizable Post Listings Customizable Comment Listings
  28. 28. Customizable Post Listings
  29. 29. phpMyAdmin WordPress Plugin
  30. 30. http://lorelle.wordpress.com/2007/02/06/a-love-letter-to-wordpress-plugin-authors/
  31. 31. A New Plugin For Your New WordPress VersionThe latest WordPress version was launched. Yes,WordPress 3.0 was already available and ready tooptimize for our blog. Indeed, WordPress is alwaysthe best blogging platform for me and I believe formany other blogger. However, as in title, I willintroduce you with a great WordPress Plugin whichI believe perfectly match with WordPress 3.0. It canbe said as a new plugin for a new WordPress blog.
  32. 32. Best Blogroll WordPress PluginAllows customization of the blogroll orsidebar links.
  33. 33. Embrace Code Standards
  34. 34. • Test in variety of environments and start early.• TEST TEST TEST TEST TEST.• Know your licenses (understand GPL thoroughly)• Be ready to update fixes immediately.• Make it brain-dead stupid to use.• Add version numbers EVERYWHERE including database option arrays.• Ask users the version number.• URL Bugs: Embrace https, subdomains, subwebs.
  35. 35. • Prepare for feedback • Your site clearly shows links to Plugins and expertise • WordPress Plugin Directory • WordPress Support Forums• Promote and Monitor • WordPress Support Forums • Google Search • Twitter • Facebook • Stackoverflow • oDesk• Never assume.• Listen, Listen, Listen, LISTEN DAMN IT!
  36. 36. The WordPress Codex is your friend http://codex.wordpress.org/
  37. 37. Nine APIs in WordPress
  38. 38. • Code, Web, and Accessibility Standards• PHP 5+• JavaScript, AJAX, jQuery• Apache/Unix basics• HTML/CSS• XML• API• Trac/Subversion• Mobile
  39. 39. • Only full college credit WordPress course in the world.• Overview of WordPress publishing and content management platform • Content development • Layout and design • WordPress Themes • WordPress Plugins • Underlying technologies Tues & Thurs • Interactivity 6-8:30 PM • Social web integration July 3 – August 23 ITEM # 1867
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×