SlideShare uma empresa Scribd logo
1 de 28
WordPress [Shortcodes]
               Prepared for WordCamp Boston on July 14th, 2012

               http://bit.ly/wcbos_shortcodes




Jon Bishop • Web Developer • 77 N. Washington St., 8th Floor, Boston MA 02114 • 617.837.8158
About AMP Agency
•   Independently-owned, integrated communications
    agency
•   Clients Include: Hasbro, Maybelline New York,
    Samsonite, Intel, Princess Cruises, NFL Players and
    Ansell Healthcare
What Is The Problem?
WordPress users with
minimal HTML experience
spend too much time trying
to create and format
content.
Why Are Shortcodes Useful?
•   Easy to manage
•   Easier access to dynamic content
•   Simplify repetitive tasks
•   Make things look pretty
What Are Shortcodes?
Bits of code you use in the WordPress visual editor to
generate dynamic content on the front end.
HTML:



Shortcode:



Result:




http://codex.wordpress.org/Shortcode
WordPress.org Shortcodes
[gallery]



The [gallery] shortcode is used in a Post or Page to display a thumbnail gallery
of images attached to that post.
WordPress.com Shortcodes
                                              Jetpack:
isc Shortcodes:
                                              •[archives]
archives]                                     •[audio]
                                              •[blip.tv]
contact-form]
                                              •[dailymotion]
digg]                                         •[digg]
                                              •[flickr]
googlemaps]
                                              •[googlevideo]

polldaddy]
                                              •[polldaddy]
http://en.support.wordpress.com/shortcodes/
                                              •[scribd]
sourcecode][/sourcecode]
Using Shortcodes
Enclosed/Self-Enclosed

[shortcode]Some Content[/shortcode]

[shortcode]



Attributes

[shortcode option1="something" option2="more"]

[shortcode option1="more"]Some Content[/shortcode]




http://codex.wordpress.org/Shortcode_API
Creating Simple Shortcodes
     function wpb_shortcode() {

           return 'Hi Boston WordCamp!';

     }

     add_shortcode('wpb', 'wpb_shortcode');



     Now use can use [wpb] in your posts & pages to display the returned
     content from our wpb_boston function.




http://codex.wordpress.org/Shortcode_API
Creating Advanced Shortcodes
 function link_shortcode($atts, $content = null) {

     extract(shortcode_atts(

           array(

               'class' => 'link',

               'href' => '#'

           ), $atts

     ));

     return '<a href="'.$href.'" class="'.$class.'">'.$content.'</a>';

 }

 add_shortcode('link', 'link_shortcode');




 Now use can use [link] in your posts & pages to display the returned
 content from our link_shortcode function
Real World Examples: Before
Real World Examples: After
More Examples ..
Buttons




                   Content Boxes
More Examples ..
Icon Lists




                   Columns
More Examples ..
Drop Caps




                   Quotes
More Examples ..
Pricing Table




                   Author Info
More Examples ..
Contact Forms




                   Tabs
Favorite Shortcode Plugins

hortcodes Ultimate - Enables you to easily create buttons, tabs, boxes,
sliders, tooltips and many more elements

ttp://wordpress.org/extend/plugins/shortcodes-ultimate/



Shortcodes - Similar to Shortcodes Ultimate with additional style options

ttp://wordpress.org/extend/plugins/j-shortcodes/



hortcodes Pro -Allows for quick and easy creation of WordPress shortcodes
from the WordPress admin

ttp://wordpress.org/extend/plugins/shortcodes-pro/
Other Cool Uses
•   Advertising

•   Social Media Buttons

•   Calls to Action

•   Posts from RSS

•   Hiding Private Content

•   Displaying Widgets in Content
Be Careful!
•   Themes vs Plugins

•   Nesting

•   Usability
Making Shortcodes Easier

sing a UI to manage and insert shortcodes
Making Shortcodes Easier ..
Shortcode Tips & Tricks

he following will execute all shortcodes in a string of text:

o_shortcode('Text with a [shortcode] in it');




un shortcodes in a text widget:

dd_filter('widget_text', 'do_shortcode');




un shortcodes in comment text:
Embeds

mbedding javascript into your posts/pages is hard!



avascript embed codes won't work on WordPress.com

avascript embed codes sometimes work in the self-hosted
HTML editor




http://codex.wordpress.org/Embeds
Using oEmbed

ll you need to do to embed something into a post or page is
to post the URL to it into your content area. Make sure that
the URL is on its own line and not hyperlinked (clickable
when viewing the post).



dding Support For An oEmbed-Enabled Site

p_oembed_add_provider()



http://codex.wordpress.org/Embeds
dding Support For A Non-oEmbed Site
Using oEmbed ..

heck the "Auto-embeds" check box in Administration
> Settings > Media SubPanel.


roviders                            • Revision3
                                    • Scribd
                                    • Photobucket
                                    • PollDaddy
ouTube
                                    • WordPress.tv
imeo                                • SmugMug
                                    • FunnyOrDie.com
ailyMotion                          • Twitter
http://codex.wordpress.org/Embeds
lip.tv
Boston WordPress Meetup

e are currently the 2nd largest WordPress meetup in the
world with 1390+ members



e are growing every day and our current team can not
handle the workload



e are looking for speakers, sponsors and supporters

lease email Kurt (keng@bostonwp.org) and Jon
http://bostonwp.org
(jbishop@bostonwp.org) if interested
Thanks!
Jon Bishop
Web Developer @ AMP Agency

Website / JonBishop.com
Twitter / @JonDBishop

Mais conteúdo relacionado

Mais procurados

Custom post types - WordPress
Custom post types - WordPressCustom post types - WordPress
Custom post types - WordPresskeithdevon
 
Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)Chris Coyier
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalChandra Prakash Thapa
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme developmentTammy Hart
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2Josh Lee
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressJonny Allbut
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme developmentJonny Allbut
 
How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Sessionpamselle
 
Taking WordPress as a CMS, to the Limit
Taking WordPress as a CMS, to the LimitTaking WordPress as a CMS, to the Limit
Taking WordPress as a CMS, to the LimitJosh Guffey
 
There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)Grace Solivan
 
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011Kathryn Presner
 
Digital marketing class ppt
Digital marketing class pptDigital marketing class ppt
Digital marketing class pptketan borhade
 
Intro To WordPress Themes
Intro To WordPress ThemesIntro To WordPress Themes
Intro To WordPress Themesdamonsharp
 
Saigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupSaigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupTriết Sài Gòn
 
How to Jazz Up Your WordPress Site – without a lick o’ code
How to Jazz Up Your WordPress Site – without a lick o’ codeHow to Jazz Up Your WordPress Site – without a lick o’ code
How to Jazz Up Your WordPress Site – without a lick o’ codeKathryn Presner
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealJoey Kudish
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinSuzanne Dergacheva
 

Mais procurados (20)

Custom post types - WordPress
Custom post types - WordPressCustom post types - WordPress
Custom post types - WordPress
 
Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme development
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
 
How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public Release
 
Bootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress MeetupBootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress Meetup
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Session
 
Taking WordPress as a CMS, to the Limit
Taking WordPress as a CMS, to the LimitTaking WordPress as a CMS, to the Limit
Taking WordPress as a CMS, to the Limit
 
There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)
 
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
 
Digital marketing class ppt
Digital marketing class pptDigital marketing class ppt
Digital marketing class ppt
 
Intro To WordPress Themes
Intro To WordPress ThemesIntro To WordPress Themes
Intro To WordPress Themes
 
Saigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupSaigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress Meetup
 
How to Jazz Up Your WordPress Site – without a lick o’ code
How to Jazz Up Your WordPress Site – without a lick o’ codeHow to Jazz Up Your WordPress Site – without a lick o’ code
How to Jazz Up Your WordPress Site – without a lick o’ code
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 

Semelhante a WordCamp Boston 2012 - Creating Content With Shortcodes

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Creating Content With Shortcodes
Creating Content With ShortcodesCreating Content With Shortcodes
Creating Content With ShortcodesJon Bishop
 
Shortcodes: WordUp Pompey! Feb-2012
Shortcodes: WordUp Pompey! Feb-2012Shortcodes: WordUp Pompey! Feb-2012
Shortcodes: WordUp Pompey! Feb-2012Herb Miller
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterbrightrocket
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...Denise Williams
 
WordPress and Shortcodes
WordPress and ShortcodesWordPress and Shortcodes
WordPress and ShortcodesJon Bishop
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixAlice Pang
 
Working with Shortcodes in WordPress
Working with Shortcodes in WordPressWorking with Shortcodes in WordPress
Working with Shortcodes in WordPresschaefele
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityMichelle Davies (Hryvnak)
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and SecurityJoe Casabona
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrixAlice Pang
 
WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!Frédéric Harper
 
Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Michele Butcher-Jones
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]David Wesst
 
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...Frédéric Harper
 
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!Frédéric Harper
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web DevelopmentDaryll Chu
 

Semelhante a WordCamp Boston 2012 - Creating Content With Shortcodes (20)

Wordpress Shortcode
Wordpress ShortcodeWordpress Shortcode
Wordpress Shortcode
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Creating Content With Shortcodes
Creating Content With ShortcodesCreating Content With Shortcodes
Creating Content With Shortcodes
 
Shortcodes: WordUp Pompey! Feb-2012
Shortcodes: WordUp Pompey! Feb-2012Shortcodes: WordUp Pompey! Feb-2012
Shortcodes: WordUp Pompey! Feb-2012
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniter
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...
 
WordPress and Shortcodes
WordPress and ShortcodesWordPress and Shortcodes
WordPress and Shortcodes
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrix
 
Working with Shortcodes in WordPress
Working with Shortcodes in WordPressWorking with Shortcodes in WordPress
Working with Shortcodes in WordPress
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrix
 
WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!
 
Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
 
Blog basics
Blog basicsBlog basics
Blog basics
 
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
 
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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 CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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.pdfUK Journal
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

WordCamp Boston 2012 - Creating Content With Shortcodes

  • 1. WordPress [Shortcodes] Prepared for WordCamp Boston on July 14th, 2012 http://bit.ly/wcbos_shortcodes Jon Bishop • Web Developer • 77 N. Washington St., 8th Floor, Boston MA 02114 • 617.837.8158
  • 2. About AMP Agency • Independently-owned, integrated communications agency • Clients Include: Hasbro, Maybelline New York, Samsonite, Intel, Princess Cruises, NFL Players and Ansell Healthcare
  • 3. What Is The Problem? WordPress users with minimal HTML experience spend too much time trying to create and format content.
  • 4. Why Are Shortcodes Useful? • Easy to manage • Easier access to dynamic content • Simplify repetitive tasks • Make things look pretty
  • 5. What Are Shortcodes? Bits of code you use in the WordPress visual editor to generate dynamic content on the front end. HTML: Shortcode: Result: http://codex.wordpress.org/Shortcode
  • 6. WordPress.org Shortcodes [gallery] The [gallery] shortcode is used in a Post or Page to display a thumbnail gallery of images attached to that post.
  • 7. WordPress.com Shortcodes Jetpack: isc Shortcodes: •[archives] archives] •[audio] •[blip.tv] contact-form] •[dailymotion] digg] •[digg] •[flickr] googlemaps] •[googlevideo] polldaddy] •[polldaddy] http://en.support.wordpress.com/shortcodes/ •[scribd] sourcecode][/sourcecode]
  • 8. Using Shortcodes Enclosed/Self-Enclosed [shortcode]Some Content[/shortcode] [shortcode] Attributes [shortcode option1="something" option2="more"] [shortcode option1="more"]Some Content[/shortcode] http://codex.wordpress.org/Shortcode_API
  • 9. Creating Simple Shortcodes function wpb_shortcode() { return 'Hi Boston WordCamp!'; } add_shortcode('wpb', 'wpb_shortcode'); Now use can use [wpb] in your posts & pages to display the returned content from our wpb_boston function. http://codex.wordpress.org/Shortcode_API
  • 10. Creating Advanced Shortcodes function link_shortcode($atts, $content = null) { extract(shortcode_atts( array( 'class' => 'link', 'href' => '#' ), $atts )); return '<a href="'.$href.'" class="'.$class.'">'.$content.'</a>'; } add_shortcode('link', 'link_shortcode'); Now use can use [link] in your posts & pages to display the returned content from our link_shortcode function
  • 13. More Examples .. Buttons Content Boxes
  • 14. More Examples .. Icon Lists Columns
  • 15. More Examples .. Drop Caps Quotes
  • 16. More Examples .. Pricing Table Author Info
  • 18. Favorite Shortcode Plugins hortcodes Ultimate - Enables you to easily create buttons, tabs, boxes, sliders, tooltips and many more elements ttp://wordpress.org/extend/plugins/shortcodes-ultimate/ Shortcodes - Similar to Shortcodes Ultimate with additional style options ttp://wordpress.org/extend/plugins/j-shortcodes/ hortcodes Pro -Allows for quick and easy creation of WordPress shortcodes from the WordPress admin ttp://wordpress.org/extend/plugins/shortcodes-pro/
  • 19. Other Cool Uses • Advertising • Social Media Buttons • Calls to Action • Posts from RSS • Hiding Private Content • Displaying Widgets in Content
  • 20. Be Careful! • Themes vs Plugins • Nesting • Usability
  • 21. Making Shortcodes Easier sing a UI to manage and insert shortcodes
  • 23. Shortcode Tips & Tricks he following will execute all shortcodes in a string of text: o_shortcode('Text with a [shortcode] in it'); un shortcodes in a text widget: dd_filter('widget_text', 'do_shortcode'); un shortcodes in comment text:
  • 24. Embeds mbedding javascript into your posts/pages is hard! avascript embed codes won't work on WordPress.com avascript embed codes sometimes work in the self-hosted HTML editor http://codex.wordpress.org/Embeds
  • 25. Using oEmbed ll you need to do to embed something into a post or page is to post the URL to it into your content area. Make sure that the URL is on its own line and not hyperlinked (clickable when viewing the post). dding Support For An oEmbed-Enabled Site p_oembed_add_provider() http://codex.wordpress.org/Embeds dding Support For A Non-oEmbed Site
  • 26. Using oEmbed .. heck the "Auto-embeds" check box in Administration > Settings > Media SubPanel. roviders • Revision3 • Scribd • Photobucket • PollDaddy ouTube • WordPress.tv imeo • SmugMug • FunnyOrDie.com ailyMotion • Twitter http://codex.wordpress.org/Embeds lip.tv
  • 27. Boston WordPress Meetup e are currently the 2nd largest WordPress meetup in the world with 1390+ members e are growing every day and our current team can not handle the workload e are looking for speakers, sponsors and supporters lease email Kurt (keng@bostonwp.org) and Jon http://bostonwp.org (jbishop@bostonwp.org) if interested
  • 28. Thanks! Jon Bishop Web Developer @ AMP Agency Website / JonBishop.com Twitter / @JonDBishop

Notas do Editor

  1. Customize title / name