SlideShare a Scribd company logo
1 of 27
Shortcodes vs Widgets:
Which one and how?
Amanda Giles
@AmandaGilesNH
http://www.amandagiles.com/blog/shortcodes-vs-widgets/
WordCamp Boston – Aug 23, 2014 - #wcbos
Who am I?
• Independent IT Consultant
• WordPress Developer (Themes and Plugins, but mostly themes)
• Run the Seacoast NH WordPress Meetup
• Lover
• Fighter
• Apparently I like playing with PowerPoint…
• Teacher / Trainer
And I have cats!
Information Gathering…
• Who here has used a widget?
• Who here has created a widget?
• Who has lost hours trying plugin after plugin to
find the “right” widget or shortcode?
• Who here has used a shortcode?
• Who here has created a shortcode?
Who is this talk geared towards?
Developers
But what if I’m not a
developer?
Top 5 Reasons you should stay
(evenifyou’renotadeveloper)
5. Be more likely to use a widgets or shortcodes (if
you haven’t before)
4. Utilize a “create your own shortcode” plugin
3. Convince the plugin developer to modify their
widget or shortcode to address your needs
better
2. Find a widget or shortcode that’s close to your
needs and hire someone to modify it
1. Roll up your sleeves and try your hand at coding a
widget or shortcode
What is a widget?
• A way to take inputted criteria from a WordPress user
and convert that to into output for a website visitor.
• Drag and Drop widgets into widget areas under
Appearance > Widgets
• Collect input [criteria] from user via a form
• When website is viewed, content is displayed to a
website visitor
Widget Examples
What is a shortcode?
• A way to take inputted criteria from a WordPress user
and convert that to into output for a website visitor.
• Typed manually into the post’s TinyMCE editor, typed
into a widget*, or sometimes created via a button in the
TinyMCE Editor.
• Collect input from user via attributes within the
shortcode
• When website is viewed, content is displayed to a
website visitor
• A way to take inputted criteria from a WordPress user
and convert that to into output for a website visitor.
• Typed manually into the post’s TinyMCE editor, typed
into a widget*, or sometimes created via a button in the
TinyMCE Editor.
• Collect input from user via attributes within the
shortcode
• When website is viewed, content is displayed to a
website visitor
Shortcode Example
Shortcode Example
Shortcode Structure
Shortcode structure depends on how the shortcode is written.
Syntax: [shortcode]content[/shortcode]
Example: [email]john@doe.com[/email]
Syntax: [shortcode attribute=“value”]
Example: [email address=“john@doe.com”]
Syntax: [shortcode attribute=“value”]content[/shortcode]
Example: [email class=“contactme”]john@doe.com[/shortcode]
Why create your own
shortcodes and widgets?
But seriously…
Widgets and shortcodes are ways to
control the content and/or presentation
while giving the user choices about that
content, location, and even presentation.
A good widget or shortcode should…
For Users:
Anticipate what choices or variations
the user might want
For Developers:
Offer ways to adjust the
output where feasible
What does that mean?
• Offer choices to filter what content shows
• Offer choices about what parts of that content
are shown
• Offer style choices
• Provide basic clean styling or no styling
• Be sure to tag elements with id/class so styles
can be addressed to specific elements
• Use hooks to allow filtering/altering of output
(for developers)
Widgets vs Shortcodes
+ Drag and Drop
+ Easy and Intuitive UI
+ Can include descriptive text
- Not very intuitive to use
- Typos are their downfall
- No visible guidance
- Only put them in widget
areas
- Can’t copy them
- More coding
+ Put them in any content
area (including in widget
areas)
+ Easily copy them
+ Less coding
Anatomy of a Widget
1. Declaration/Contruct
Tell WordPress some information about your widget and how to identify it
2. User Interface / Form
Define the form that will gather user's choices about the widget instance
3. Update/Save Logic
Save the user's choices about the widget instance
4. Widget Display Logic
Display the widget instance to the website visitor
5. Register the Widget
Tell WordPress to register your widget and include it on the
Appearance > Widgets page
Widget Code Structure
On to the code!
Anatomy of a Shortcode
1. Shortcode function
Interprets the shortcode attributes and content and “returns” the output
2. Register the Shortcode function
Tell WordPress to register your shortcode so that it will be
interpreted when used.
Widgets vs Shortcodes
+ Drag and Drop
+ Easy and Intuitive UI
+ Can include descriptive text
- Not very intuitive to use
- Typos are their downfall
- No visible guidance
- Only put them in widget
areas
- Can’t copy them
- More coding
+ Put them anywhere
(including in widget areas)
+ Easily copy them
+ Less coding
Questions?
Thank You!
Find these slides and all related files at:
http://www.amandagiles.com/blog/shortcodes-vs-widgets/
www.AmandaGiles.com
@AmandaGilesNH on Twitter
amanda@amandagiles.com – Please feel free to send me
feedback or questions

More Related Content

What's hot

KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...Amazon Web Services Korea
 
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...Amazon Web Services
 
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...Amazon Web Services
 
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...Amazon Web Services Korea
 
AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)Akio Katayama
 
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...Amazon Web Services
 
Cognito、Azure ADと仲良くしてみた
Cognito、Azure ADと仲良くしてみたCognito、Azure ADと仲良くしてみた
Cognito、Azure ADと仲良くしてみたTakafumi Kondo
 
AWS Blackbelt 2015シリーズ Elastic Load Balancing
AWS Blackbelt 2015シリーズ Elastic Load BalancingAWS Blackbelt 2015シリーズ Elastic Load Balancing
AWS Blackbelt 2015シリーズ Elastic Load BalancingAmazon Web Services Japan
 
[AKIBA.AWS] VPCをネットワーク図で理解してみる
[AKIBA.AWS] VPCをネットワーク図で理解してみる[AKIBA.AWS] VPCをネットワーク図で理解してみる
[AKIBA.AWS] VPCをネットワーク図で理解してみるShuji Kikuchi
 
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...Amazon Web Services Korea
 
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみたYuya Ohara
 
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptx
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptxAws Batchを用いたサーバレスな競馬スクレイピング環境.pptx
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptxShichijoYuhi
 
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~Amazon Web Services Japan
 
AWS Black Belt Online Seminar Elastic Load Balancing
AWS Black Belt Online Seminar Elastic Load BalancingAWS Black Belt Online Seminar Elastic Load Balancing
AWS Black Belt Online Seminar Elastic Load BalancingAmazon Web Services Japan
 
How AWS is reinventing the cloud
How AWS is reinventing the cloudHow AWS is reinventing the cloud
How AWS is reinventing the cloudjavier ramirez
 
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)Amazon Web Services Japan
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)Amazon Web Services Japan
 
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트::  AWS Summit Online Korea 2020DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트::  AWS Summit Online Korea 2020
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020Amazon Web Services Korea
 

What's hot (20)

KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
 
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...
[REPEAT 1] Executing a Large-Scale Migration to AWS (ENT205-R1) - AWS re:Inve...
 
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...
Tinder and DynamoDB: It's a Match! Massive Data Migration, Zero Down Time - D...
 
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...
글로벌 여행/물류 시장 트렌드 및 AWS 활용 사례 - 방희란, AWS 시니어 어카운트 매니저 :: AWS Travel and Transp...
 
CCNP certificate 1
CCNP certificate 1CCNP certificate 1
CCNP certificate 1
 
AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)
 
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
 
Cognito、Azure ADと仲良くしてみた
Cognito、Azure ADと仲良くしてみたCognito、Azure ADと仲良くしてみた
Cognito、Azure ADと仲良くしてみた
 
AWS Blackbelt 2015シリーズ Elastic Load Balancing
AWS Blackbelt 2015シリーズ Elastic Load BalancingAWS Blackbelt 2015シリーズ Elastic Load Balancing
AWS Blackbelt 2015シリーズ Elastic Load Balancing
 
[AKIBA.AWS] VPCをネットワーク図で理解してみる
[AKIBA.AWS] VPCをネットワーク図で理解してみる[AKIBA.AWS] VPCをネットワーク図で理解してみる
[AKIBA.AWS] VPCをネットワーク図で理解してみる
 
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...
AWS System Manager: Parameter Store를 사용한 AWS 구성 데이터 관리 기법 - 정창훈, 당근마켓 / 김대권, ...
 
Amazon VPC VPN接続設定 参考資料
Amazon VPC VPN接続設定 参考資料Amazon VPC VPN接続設定 参考資料
Amazon VPC VPN接続設定 参考資料
 
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた
【GCP】DDoS対策 Cloud Armor(クラウドアーマー)を試してみた
 
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptx
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptxAws Batchを用いたサーバレスな競馬スクレイピング環境.pptx
Aws Batchを用いたサーバレスな競馬スクレイピング環境.pptx
 
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~
AWS Black Belt Online Seminar 2017 AWS体験ハンズオン~Amazon S3 バックアップ~
 
AWS Black Belt Online Seminar Elastic Load Balancing
AWS Black Belt Online Seminar Elastic Load BalancingAWS Black Belt Online Seminar Elastic Load Balancing
AWS Black Belt Online Seminar Elastic Load Balancing
 
How AWS is reinventing the cloud
How AWS is reinventing the cloudHow AWS is reinventing the cloud
How AWS is reinventing the cloud
 
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)
Amazon Aurora Deep Dive (re:Invent 2015 DAT405 日本語翻訳版)
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
 
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트::  AWS Summit Online Korea 2020DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트::  AWS Summit Online Korea 2020
DynamoDB를 게임에서 사용하기 – 김성수, 박경표, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020
 

Viewers also liked

The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Shipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for SymbianShipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for Symbianaccount inactive
 
Autonomous Team Requirements
Autonomous Team RequirementsAutonomous Team Requirements
Autonomous Team RequirementsLean Teams USA
 
The 4th component – fast knowledge sharing
The 4th component – fast knowledge sharingThe 4th component – fast knowledge sharing
The 4th component – fast knowledge sharingLean Teams USA
 
Process Design and Visual Value Streams
Process Design and Visual Value StreamsProcess Design and Visual Value Streams
Process Design and Visual Value StreamsLean Teams USA
 
The 3rd component - Organization Structure for Sustainment
The 3rd component - Organization Structure for SustainmentThe 3rd component - Organization Structure for Sustainment
The 3rd component - Organization Structure for SustainmentLean Teams USA
 
Google drive for nonprofits webinar
Google drive for nonprofits webinarGoogle drive for nonprofits webinar
Google drive for nonprofits webinarCraig Grella
 
The 1st component - Leadership and Mentoring
The 1st component - Leadership and MentoringThe 1st component - Leadership and Mentoring
The 1st component - Leadership and MentoringLean Teams USA
 
How To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.comHow To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.comKathy Gill
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011photomatt
 

Viewers also liked (14)

The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Shipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for SymbianShipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for Symbian
 
The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
 
Wordpress Shortcode
Wordpress ShortcodeWordpress Shortcode
Wordpress Shortcode
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
5s slideshare
5s slideshare5s slideshare
5s slideshare
 
Autonomous Team Requirements
Autonomous Team RequirementsAutonomous Team Requirements
Autonomous Team Requirements
 
The 4th component – fast knowledge sharing
The 4th component – fast knowledge sharingThe 4th component – fast knowledge sharing
The 4th component – fast knowledge sharing
 
Process Design and Visual Value Streams
Process Design and Visual Value StreamsProcess Design and Visual Value Streams
Process Design and Visual Value Streams
 
The 3rd component - Organization Structure for Sustainment
The 3rd component - Organization Structure for SustainmentThe 3rd component - Organization Structure for Sustainment
The 3rd component - Organization Structure for Sustainment
 
Google drive for nonprofits webinar
Google drive for nonprofits webinarGoogle drive for nonprofits webinar
Google drive for nonprofits webinar
 
The 1st component - Leadership and Mentoring
The 1st component - Leadership and MentoringThe 1st component - Leadership and Mentoring
The 1st component - Leadership and Mentoring
 
How To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.comHow To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.com
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
 

Similar to Shortcodes vs Widgets: Which one and how?

Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsAmanda Giles
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsAmanda Giles
 
WordPress and Shortcodes
WordPress and ShortcodesWordPress and Shortcodes
WordPress and ShortcodesJon Bishop
 
Creating Content With Shortcodes
Creating Content With ShortcodesCreating Content With Shortcodes
Creating Content With ShortcodesJon Bishop
 
WordCamp Boston 2012 - Creating Content With Shortcodes
WordCamp Boston 2012 - Creating Content With ShortcodesWordCamp Boston 2012 - Creating Content With Shortcodes
WordCamp Boston 2012 - Creating Content With ShortcodesJon Bishop
 
How to annotate_with_wordpress
How to annotate_with_wordpressHow to annotate_with_wordpress
How to annotate_with_wordpressSTIinnsbruck
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentEvan Mullins
 
Official Presentation
Official PresentationOfficial Presentation
Official PresentationAjay Yadav
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsSteven Slack
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB
 
Easy as pie creating widgets for ibm connections
Easy as pie   creating widgets for ibm connectionsEasy as pie   creating widgets for ibm connections
Easy as pie creating widgets for ibm connectionsLetsConnect
 
Choosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To ModxChoosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To Modxcallmejoe
 
Monster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsMonster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsLaurence Svekis ✔
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web componentsHoracio Gonzalez
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingDrew Morris
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaJeff Richards
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress pluginJohn Tighe
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareAlfresco Software
 
BrowserArchitecture_ClientSide.pptx
BrowserArchitecture_ClientSide.pptxBrowserArchitecture_ClientSide.pptx
BrowserArchitecture_ClientSide.pptxMuhammadBilal187526
 

Similar to Shortcodes vs Widgets: Which one and how? (20)

Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
WordPress and Shortcodes
WordPress and ShortcodesWordPress and Shortcodes
WordPress and Shortcodes
 
Creating Content With Shortcodes
Creating Content With ShortcodesCreating Content With Shortcodes
Creating Content With Shortcodes
 
WordCamp Boston 2012 - Creating Content With Shortcodes
WordCamp Boston 2012 - Creating Content With ShortcodesWordCamp Boston 2012 - Creating Content With Shortcodes
WordCamp Boston 2012 - Creating Content With Shortcodes
 
How to annotate_with_wordpress
How to annotate_with_wordpressHow to annotate_with_wordpress
How to annotate_with_wordpress
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Official Presentation
Official PresentationOfficial Presentation
Official Presentation
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for Clients
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
 
Easy as pie creating widgets for ibm connections
Easy as pie   creating widgets for ibm connectionsEasy as pie   creating widgets for ibm connections
Easy as pie creating widgets for ibm connections
 
Choosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To ModxChoosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To Modx
 
Monster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsMonster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applications
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web components
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid Prototyping
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress plugin
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
BrowserArchitecture_ClientSide.pptx
BrowserArchitecture_ClientSide.pptxBrowserArchitecture_ClientSide.pptx
BrowserArchitecture_ClientSide.pptx
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 

Shortcodes vs Widgets: Which one and how?

  • 1. Shortcodes vs Widgets: Which one and how? Amanda Giles @AmandaGilesNH http://www.amandagiles.com/blog/shortcodes-vs-widgets/ WordCamp Boston – Aug 23, 2014 - #wcbos
  • 2. Who am I? • Independent IT Consultant • WordPress Developer (Themes and Plugins, but mostly themes) • Run the Seacoast NH WordPress Meetup • Lover • Fighter • Apparently I like playing with PowerPoint… • Teacher / Trainer
  • 3. And I have cats!
  • 4. Information Gathering… • Who here has used a widget? • Who here has created a widget? • Who has lost hours trying plugin after plugin to find the “right” widget or shortcode? • Who here has used a shortcode? • Who here has created a shortcode?
  • 5. Who is this talk geared towards? Developers
  • 6. But what if I’m not a developer?
  • 7.
  • 8. Top 5 Reasons you should stay (evenifyou’renotadeveloper) 5. Be more likely to use a widgets or shortcodes (if you haven’t before) 4. Utilize a “create your own shortcode” plugin 3. Convince the plugin developer to modify their widget or shortcode to address your needs better 2. Find a widget or shortcode that’s close to your needs and hire someone to modify it 1. Roll up your sleeves and try your hand at coding a widget or shortcode
  • 9. What is a widget? • A way to take inputted criteria from a WordPress user and convert that to into output for a website visitor. • Drag and Drop widgets into widget areas under Appearance > Widgets • Collect input [criteria] from user via a form • When website is viewed, content is displayed to a website visitor
  • 11. What is a shortcode? • A way to take inputted criteria from a WordPress user and convert that to into output for a website visitor. • Typed manually into the post’s TinyMCE editor, typed into a widget*, or sometimes created via a button in the TinyMCE Editor. • Collect input from user via attributes within the shortcode • When website is viewed, content is displayed to a website visitor • A way to take inputted criteria from a WordPress user and convert that to into output for a website visitor. • Typed manually into the post’s TinyMCE editor, typed into a widget*, or sometimes created via a button in the TinyMCE Editor. • Collect input from user via attributes within the shortcode • When website is viewed, content is displayed to a website visitor
  • 14. Shortcode Structure Shortcode structure depends on how the shortcode is written. Syntax: [shortcode]content[/shortcode] Example: [email]john@doe.com[/email] Syntax: [shortcode attribute=“value”] Example: [email address=“john@doe.com”] Syntax: [shortcode attribute=“value”]content[/shortcode] Example: [email class=“contactme”]john@doe.com[/shortcode]
  • 15. Why create your own shortcodes and widgets?
  • 16. But seriously… Widgets and shortcodes are ways to control the content and/or presentation while giving the user choices about that content, location, and even presentation.
  • 17. A good widget or shortcode should… For Users: Anticipate what choices or variations the user might want For Developers: Offer ways to adjust the output where feasible
  • 18. What does that mean? • Offer choices to filter what content shows • Offer choices about what parts of that content are shown • Offer style choices • Provide basic clean styling or no styling • Be sure to tag elements with id/class so styles can be addressed to specific elements • Use hooks to allow filtering/altering of output (for developers)
  • 19. Widgets vs Shortcodes + Drag and Drop + Easy and Intuitive UI + Can include descriptive text - Not very intuitive to use - Typos are their downfall - No visible guidance - Only put them in widget areas - Can’t copy them - More coding + Put them in any content area (including in widget areas) + Easily copy them + Less coding
  • 20. Anatomy of a Widget 1. Declaration/Contruct Tell WordPress some information about your widget and how to identify it 2. User Interface / Form Define the form that will gather user's choices about the widget instance 3. Update/Save Logic Save the user's choices about the widget instance 4. Widget Display Logic Display the widget instance to the website visitor 5. Register the Widget Tell WordPress to register your widget and include it on the Appearance > Widgets page
  • 22. On to the code!
  • 23. Anatomy of a Shortcode 1. Shortcode function Interprets the shortcode attributes and content and “returns” the output 2. Register the Shortcode function Tell WordPress to register your shortcode so that it will be interpreted when used.
  • 24.
  • 25. Widgets vs Shortcodes + Drag and Drop + Easy and Intuitive UI + Can include descriptive text - Not very intuitive to use - Typos are their downfall - No visible guidance - Only put them in widget areas - Can’t copy them - More coding + Put them anywhere (including in widget areas) + Easily copy them + Less coding
  • 27. Thank You! Find these slides and all related files at: http://www.amandagiles.com/blog/shortcodes-vs-widgets/ www.AmandaGiles.com @AmandaGilesNH on Twitter amanda@amandagiles.com – Please feel free to send me feedback or questions