• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
WordPress and PHP - It Takes One to Know One
 

WordPress and PHP - It Takes One to Know One

on

  • 14,463 views

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, ...

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.

Statistics

Views

Total Views
14,463
Views on SlideShare
13,768
Embed Views
695

Actions

Likes
1
Downloads
37
Comments
0

5 Embeds 695

http://lorelleteaches.com 405
http://lorelleteaches.wordpress.com 285
http://tweetree.com 3
http://127.0.0.1 1
http://translate.googleusercontent.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    WordPress and PHP - It Takes One to Know One WordPress and PHP - It Takes One to Know One Presentation Transcript

    • 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 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…
    • • 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
    • • 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.
    • <?php bloginfo(name); ?><?php bloginfo(description); ?> <?php bloginfo(url); ?> <p>Powered by WordPress version<?php bloginfo(version); ?></p>Powered by WordPress version 3.4
    • 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>
    • <?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 »
    • Boolean Template Tags connect multiple paramters together<?php wp_list_categories( $args ); ?><ul><?phpwp_list_categories(orderby=name&include=3,5,16); ?></ul>
    • <?phpget_header();if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile;endif;get_sidebar();get_footer();?>
    • <?phpget_header();if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile;endif;get_sidebar();get_footer();?>
    • <!-- 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; ?>
    • <!-- 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; ?>
    • <!-- 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; ?>
    • <!-- 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; ?>
    • • 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
    • Child Themesfunctions.php template fileWordPress Plugins
    • • Protect original files• Allow protected customization• Use CSS !important inheritance. • Child Theme code overrides Parent Theme code.• Child Theme customization lost with Theme change.
    • • 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 );
    • • 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 Screens
    • NextGEN GalleryMy Blog’s Building Blocks BuddyPress XML Sitemap Generator @lorelleonwp WordPress.com Stats
    • 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
    • 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
    • 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 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.
    • 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 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.
    • • 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!
    • 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• API• Trac/Subversion• Mobile
    • • 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