SlideShare a Scribd company logo
1 of 39
Download to read offline
The WordPress Way
Kan Ouivirach
Navarat Pramuksan
CMS course, Stamford, 2015
Kan Ouivirach
Research & Development Engineer
Navarat Pramuksan (Oy)
Software Engineer
Pronto Marketing
Pronto Marketing
WordPress
• Originally developed as blog software having two
functions: blogging capacity and CMS abilities
• Designed for non-programmers
• Easy for writing posts
• Powerful features for developing Web sites
WordPress As
• Solution to help grow the business
• Web site for people
• Blog/Diary
• Ecommerce site
• etc.
Why WordPress?
Credit: https://yoast.com/wordpress-stats/
Why WordPress?
Credit: https://yoast.com/wordpress-stats/
Why WordPress?
• Stable
• Easy
• Large community
• Scalable
WordPress Users
WordPress.com WordPress.org
Focus on your beautiful content, and let us handle
the rest.
Get your hands dirty, and host your website
yourself.
Premium hosting, security, and backups are
included. You can even upgrade to a custom
domain, like YourGroovyDomain.com.
You’ll need to find a host, and perform backups and
maintenance yourself. We offer VaultPress for
security and backups.
Choose from hundreds of beautiful themes. Make it
your own with Custom Design.
Install custom themes. Build your own with PHP and
CSS.
Integrate your site with Facebook, Twitter, Tumblr,
and other social networks.
Install a plugin, like Jetpack, to enable sharing
functionality on your site.
Popular features like sharing, stats, comments, and
polls are included. There’s no need to install plugins.
Install plugins to extend your site’s functionality.
Personal support and the WordPress.com forums
are always available.
Visit the WordPress.org support forums for
assistance.
You must register for an account on WordPress.com
and abide by our Terms of Service.
No registration with WordPress.org is required.
WordPress Theme
Change the overall visual design and functionality
without having to alter the underlying core software.
Choosing Theme?
• Depend on situation to choose: free, framework, or
your own theme
• Choosing the right theme is very important.
WordPress Theme
Theme contains two main parts:
1. Template
2. Plugin
http://wphierarchy.com/
WordPress Template
Hierarchy
WordPress Plugin
• Allow easy modification, customization, and
enhancement.
• Instead of changing the core programming of
WordPress, you can add functionality with
WordPress Plugins.
• Seamlessly integrated using the WordPress Plugin
Application Program Interface (API).
I want to show my team on my Web site!
What We Normally Do in
Database Design..
id team_id firstname lastname
1 1 Kan Ouivirach
2 1 Navarat Pramuksan
id name
1 R&D
Team
People
Custom Post Types
• All the post types are stored in the same place, in
the wp_posts database table, but are differentiated
by a column called post_type.
• Five default post types:
• post
• page
• attachment
• revision
• nav_menu_item
Custom Post Types in
Database
Never create your own table, use
custom post type!
Custom Fields
• Allow you to assign custom fields to a post. This arbitrary
extra information is known as meta-data.
• Post meta data are stored in the wp_postmeta database
table.
• Meta-data is handled with key/value pairs.
• Meta-data can include bits of information such as:
• Mood: Happy
• Weather: Hot
Example of Custom Fields
Custom Fields in Database
wp_posts
wp_postmeta
Option API
• The Options API is a simple and standardized way
of storing data in the database.
• The API makes it easy to create, access, update,
and delete options.
• All the data is stored in the wp_options table
under a given custom name.
Options in Database
wp_options
If really necessary, instead of creating a
new table, use wp_options table.
Transients API
• Standard way to store cached data
• Similar to the Options API but with the added
feature of an expiration time
WordPress with Transients
Credit: http://www.businessbee.com/resources/news/technology-buzz/cloud-vs-network-attached-storage-pros-cons/
Database
Loading JS/CSS
<script type=“text/javascript” src=“path/to/scripts.js” />
<link rel=“stylesheet” href=“path/to/style.css”
type=“text/css” media=“all” />
• wp_register_script
• wp_enqueue_script
• wp_register_style
• wp_enqueue_style
Interacting with External
APIs
• Use wp_remote_* instead of curl because it is
not all PHP environments that have it installed.
JSON to Exchange Data
• JSON (JavaScript Object Notation)
• json_encode
• json_decode
{
"pk": 988,
"model": "accounts.account",
"fields": {
"status": "active",
"zuora_account_id": "",
"signup_date": "2014-06-26",
"name": "James Bond",
"currency": "USD"
}
},
Example of JSON
Sending Email
wp_mail(

$to,

$subject,

$message,

$header,

$attachment

);
Query Arguments
• Use add_query_arg to construct the URL.
$params = array(
“get” => “hello”,
“for” => “Kan”,
“because” => “world”
);
$url = add_query_arg( $params, $url );
Result: https://wordpress.org/?get=hello&for=Kan&because=world
WP-Cron: Scheduling Tasks
• Cron is a Unix command for scheduling tasks.
• Unlike the normal cron, WP-Cron function runs every time the site
is accessed.
• We can disable it and set up our own cron job to access the site.
• WP-Cron functions:
• Checking theme & plugin updates
• Publish scheduled posts
• + more
Pronto Showcase
WE FOLLOW WORDPRESS STANDARD
Credit: https://www.youtube.com/watch?v=EhpyonLif6U
WE COOL
Resources
• WordPress Codex - http://codex.wordpress.org/
• WordPress Plugins - https://wordpress.org/plugins/
• WordPress.tv - http://wordpress.tv/
• Make WordPress - https://make.wordpress.org/
• WordPress on Slack - https://wordpress.slack.com/
References
• https://codex.wordpress.org
• http://www.slideshare.net/mattwiebe/doing-things-
the-wordpress-way
• http://ben.lobaugh.net/blog/46117/wordpress-
interacting-with-external-apis
• http://wphierarchy.com
WordPress Workshop
Let’s get your hands dirty!
Prerequisites
• Have WordPress installed on your local machine.
• Have a source code editor like Sublime Text or
Atom on your machine.

More Related Content

What's hot

Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your ClientsWhy Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
ryanduff
 

What's hot (20)

Child Themes and CSS in WordPress
Child Themes and CSS in WordPressChild Themes and CSS in WordPress
Child Themes and CSS in WordPress
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Plugins
 
Wordpress Setup Basics for Dummies by Haneef Puttur
Wordpress Setup Basics for Dummies by Haneef PutturWordpress Setup Basics for Dummies by Haneef Puttur
Wordpress Setup Basics for Dummies by Haneef Puttur
 
WordPress Theme Reviewers Team
WordPress Theme Reviewers TeamWordPress Theme Reviewers Team
WordPress Theme Reviewers Team
 
Wordpress Installation in Local machine for Dummies By Haneef Puttur
Wordpress Installation in Local machine for Dummies  By Haneef PutturWordpress Installation in Local machine for Dummies  By Haneef Puttur
Wordpress Installation in Local machine for Dummies By Haneef Puttur
 
Wordpress Installation in CPANEL for Dummies
Wordpress Installation in CPANEL for DummiesWordpress Installation in CPANEL for Dummies
Wordpress Installation in CPANEL for Dummies
 
WordPress Fav Plugins & Security
WordPress Fav Plugins & SecurityWordPress Fav Plugins & Security
WordPress Fav Plugins & Security
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate Workshop
 
WordCamp Boston WordPress plugins-8-2014
WordCamp Boston WordPress plugins-8-2014WordCamp Boston WordPress plugins-8-2014
WordCamp Boston WordPress plugins-8-2014
 
Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)
 
WordPress as a CMS
WordPress as a CMSWordPress as a CMS
WordPress as a CMS
 
WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your ClientsWhy Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
Why Switching To WordPress 3.0 Is The Best Thing You Can Do For Your Clients
 
Wordpress For Begineer
Wordpress For BegineerWordpress For Begineer
Wordpress For Begineer
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
SEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress OptimizationSEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress Optimization
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPress
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
WordPress Resources Nov 2014
WordPress Resources Nov 2014WordPress Resources Nov 2014
WordPress Resources Nov 2014
 

Similar to The WordPress Way

Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website development
John Faust
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
Think Media Inc.
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
Joe Casabona
 

Similar to The WordPress Way (20)

Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website development
 
WordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-BetweenWordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-Between
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
How to create a WordPress Site
How to create a WordPress Site How to create a WordPress Site
How to create a WordPress Site
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
Word Press As A Cms
Word Press As A CmsWord Press As A Cms
Word Press As A Cms
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Wordpress Beyond A Blog Word Camp Toronto08
Wordpress Beyond A Blog Word Camp Toronto08Wordpress Beyond A Blog Word Camp Toronto08
Wordpress Beyond A Blog Word Camp Toronto08
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
WordCamp 2015
WordCamp 2015WordCamp 2015
WordCamp 2015
 
Up and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignUp and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web Design
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
Wordpress Tech Talk at Atlogys
Wordpress Tech Talk at AtlogysWordpress Tech Talk at Atlogys
Wordpress Tech Talk at Atlogys
 

More from Kan Ouivirach, Ph.D.

Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
Kan Ouivirach, Ph.D.
 
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
Kan Ouivirach, Ph.D.
 
Adapting Scrum to Managing a Research Group
Adapting Scrum to Managing a Research GroupAdapting Scrum to Managing a Research Group
Adapting Scrum to Managing a Research Group
Kan Ouivirach, Ph.D.
 

More from Kan Ouivirach, Ph.D. (19)

Adoption of AI: The Great Opportunities for Everyone
Adoption of AI: The Great Opportunities for EveryoneAdoption of AI: The Great Opportunities for Everyone
Adoption of AI: The Great Opportunities for Everyone
 
Uncover Python's Potential in Machine Learning
Uncover Python's Potential in Machine LearningUncover Python's Potential in Machine Learning
Uncover Python's Potential in Machine Learning
 
WordPress Hooks: The Right Way to Extend Your WordPress
WordPress Hooks: The Right Way to Extend Your WordPressWordPress Hooks: The Right Way to Extend Your WordPress
WordPress Hooks: The Right Way to Extend Your WordPress
 
Lesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoLesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at Pronto
 
หัดเขียน A.I. แบบ AlphaGo กันชิวๆ
หัดเขียน A.I. แบบ AlphaGo กันชิวๆหัดเขียน A.I. แบบ AlphaGo กันชิวๆ
หัดเขียน A.I. แบบ AlphaGo กันชิวๆ
 
Agile and Scrum Methodology
Agile and Scrum MethodologyAgile and Scrum Methodology
Agile and Scrum Methodology
 
Machine Learning at Geeky Base 2
Machine Learning at Geeky Base 2Machine Learning at Geeky Base 2
Machine Learning at Geeky Base 2
 
Machine Learning คือ? #bcbk
Machine Learning คือ? #bcbkMachine Learning คือ? #bcbk
Machine Learning คือ? #bcbk
 
What We Do in This Weird Office Culture
What We Do in This Weird Office CultureWhat We Do in This Weird Office Culture
What We Do in This Weird Office Culture
 
Exploring Machine Learning in Python with Scikit-Learn
Exploring Machine Learning in Python with Scikit-LearnExploring Machine Learning in Python with Scikit-Learn
Exploring Machine Learning in Python with Scikit-Learn
 
Machine Learning at Geeky Base
Machine Learning at Geeky BaseMachine Learning at Geeky Base
Machine Learning at Geeky Base
 
Thailand Hadoop Big Data Challenge #1
Thailand Hadoop Big Data Challenge #1Thailand Hadoop Big Data Challenge #1
Thailand Hadoop Big Data Challenge #1
 
Achieving "Zero Downtime Deployment" with Automated Testing
Achieving "Zero Downtime Deployment" with Automated TestingAchieving "Zero Downtime Deployment" with Automated Testing
Achieving "Zero Downtime Deployment" with Automated Testing
 
Pronto R&D Presentation
Pronto R&D PresentationPronto R&D Presentation
Pronto R&D Presentation
 
Scrum at Pronto Marketing
Scrum at Pronto MarketingScrum at Pronto Marketing
Scrum at Pronto Marketing
 
Practical Experience in Automated Testing at Pronto Marketing
Practical Experience in Automated Testing at Pronto MarketingPractical Experience in Automated Testing at Pronto Marketing
Practical Experience in Automated Testing at Pronto Marketing
 
Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Disc...
 
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
Clustering Human Behaviors with Dynamic Time Warping and Hidden Markov Models...
 
Adapting Scrum to Managing a Research Group
Adapting Scrum to Managing a Research GroupAdapting Scrum to Managing a Research Group
Adapting Scrum to Managing a Research Group
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

The WordPress Way

  • 1. The WordPress Way Kan Ouivirach Navarat Pramuksan CMS course, Stamford, 2015
  • 2. Kan Ouivirach Research & Development Engineer Navarat Pramuksan (Oy) Software Engineer Pronto Marketing Pronto Marketing
  • 3. WordPress • Originally developed as blog software having two functions: blogging capacity and CMS abilities • Designed for non-programmers • Easy for writing posts • Powerful features for developing Web sites
  • 4. WordPress As • Solution to help grow the business • Web site for people • Blog/Diary • Ecommerce site • etc.
  • 7. Why WordPress? • Stable • Easy • Large community • Scalable
  • 9. WordPress.com WordPress.org Focus on your beautiful content, and let us handle the rest. Get your hands dirty, and host your website yourself. Premium hosting, security, and backups are included. You can even upgrade to a custom domain, like YourGroovyDomain.com. You’ll need to find a host, and perform backups and maintenance yourself. We offer VaultPress for security and backups. Choose from hundreds of beautiful themes. Make it your own with Custom Design. Install custom themes. Build your own with PHP and CSS. Integrate your site with Facebook, Twitter, Tumblr, and other social networks. Install a plugin, like Jetpack, to enable sharing functionality on your site. Popular features like sharing, stats, comments, and polls are included. There’s no need to install plugins. Install plugins to extend your site’s functionality. Personal support and the WordPress.com forums are always available. Visit the WordPress.org support forums for assistance. You must register for an account on WordPress.com and abide by our Terms of Service. No registration with WordPress.org is required.
  • 10. WordPress Theme Change the overall visual design and functionality without having to alter the underlying core software.
  • 11. Choosing Theme? • Depend on situation to choose: free, framework, or your own theme • Choosing the right theme is very important.
  • 12. WordPress Theme Theme contains two main parts: 1. Template 2. Plugin
  • 14. WordPress Plugin • Allow easy modification, customization, and enhancement. • Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins. • Seamlessly integrated using the WordPress Plugin Application Program Interface (API).
  • 15. I want to show my team on my Web site!
  • 16.
  • 17. What We Normally Do in Database Design.. id team_id firstname lastname 1 1 Kan Ouivirach 2 1 Navarat Pramuksan id name 1 R&D Team People
  • 18. Custom Post Types • All the post types are stored in the same place, in the wp_posts database table, but are differentiated by a column called post_type. • Five default post types: • post • page • attachment • revision • nav_menu_item
  • 19. Custom Post Types in Database
  • 20. Never create your own table, use custom post type!
  • 21. Custom Fields • Allow you to assign custom fields to a post. This arbitrary extra information is known as meta-data. • Post meta data are stored in the wp_postmeta database table. • Meta-data is handled with key/value pairs. • Meta-data can include bits of information such as: • Mood: Happy • Weather: Hot
  • 23. Custom Fields in Database wp_posts wp_postmeta
  • 24. Option API • The Options API is a simple and standardized way of storing data in the database. • The API makes it easy to create, access, update, and delete options. • All the data is stored in the wp_options table under a given custom name.
  • 26. If really necessary, instead of creating a new table, use wp_options table.
  • 27. Transients API • Standard way to store cached data • Similar to the Options API but with the added feature of an expiration time WordPress with Transients Credit: http://www.businessbee.com/resources/news/technology-buzz/cloud-vs-network-attached-storage-pros-cons/ Database
  • 28. Loading JS/CSS <script type=“text/javascript” src=“path/to/scripts.js” /> <link rel=“stylesheet” href=“path/to/style.css” type=“text/css” media=“all” /> • wp_register_script • wp_enqueue_script • wp_register_style • wp_enqueue_style
  • 29. Interacting with External APIs • Use wp_remote_* instead of curl because it is not all PHP environments that have it installed.
  • 30. JSON to Exchange Data • JSON (JavaScript Object Notation) • json_encode • json_decode { "pk": 988, "model": "accounts.account", "fields": { "status": "active", "zuora_account_id": "", "signup_date": "2014-06-26", "name": "James Bond", "currency": "USD" } }, Example of JSON
  • 32. Query Arguments • Use add_query_arg to construct the URL. $params = array( “get” => “hello”, “for” => “Kan”, “because” => “world” ); $url = add_query_arg( $params, $url ); Result: https://wordpress.org/?get=hello&for=Kan&because=world
  • 33. WP-Cron: Scheduling Tasks • Cron is a Unix command for scheduling tasks. • Unlike the normal cron, WP-Cron function runs every time the site is accessed. • We can disable it and set up our own cron job to access the site. • WP-Cron functions: • Checking theme & plugin updates • Publish scheduled posts • + more
  • 35. WE FOLLOW WORDPRESS STANDARD Credit: https://www.youtube.com/watch?v=EhpyonLif6U WE COOL
  • 36. Resources • WordPress Codex - http://codex.wordpress.org/ • WordPress Plugins - https://wordpress.org/plugins/ • WordPress.tv - http://wordpress.tv/ • Make WordPress - https://make.wordpress.org/ • WordPress on Slack - https://wordpress.slack.com/
  • 37. References • https://codex.wordpress.org • http://www.slideshare.net/mattwiebe/doing-things- the-wordpress-way • http://ben.lobaugh.net/blog/46117/wordpress- interacting-with-external-apis • http://wphierarchy.com
  • 38. WordPress Workshop Let’s get your hands dirty!
  • 39. Prerequisites • Have WordPress installed on your local machine. • Have a source code editor like Sublime Text or Atom on your machine.