Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Working with Shortcodes in WordPress
1. DON’T TYPE IT OVER AND OVER
Chad Haefele
Interim Head of User Experience
UNC Chapel Hill Libraries
cHaefele@email.unc.edu
Working with Shortcodes in WordPress
2. Previously on Florida Library
Webinars…
https://floridalibrarywebinars.org/building-a-library-website-in-wordpress-ondemand/
3. Previously on Florida Library
Webinars…
https://floridalibrarywebinars.org/media-in-wordpress-ondemand/
18. Build a basic text substitution shortcode
1. Put your reusable text in the top edit box
2. Set the ShortCode Type dropdown to Simple Snippet
3. Choose a ShortCode Tag – this is the text you’ll use to
trigger your Shortcode
4. Click the Publish button
5. Go put [YourShortcodeTag] somewhere in a Page or
Post.
19. Build a Twitter widget shortcode
1. Get the code for your Twitter widget from
twitter.com/settings/widgets
2. Put your Twitter widget code in the top edit box
3. Set the ShortCode Type dropdown to Simple Snippet
4. Choose a ShortCode Tag – this is the text you’ll use to
trigger your Shortcode
5. Click the Publish button
6. Go put [YourShortcodeTag] somewhere in a Page or
Post.
20. Enable shortcodes in WP widgets
WARNING! THIS COULD BREAK THINGS!
1. Under Appearance, go to Editor
2. Edit your functions.php file (it might be called Theme
Functions)
3. Add this code near the top of the file:
// Enable shortcodes in widgets
add_filter('widget_text', 'do_shortcode');
4. Click Update File
Alternatively, use this plugin:
wordpress.org/plugins/shortcode-widget/
21. Build a libraryh3lp shortcode (advanced!)
1. Set the ShortCode Type dropdown to Simple One Tag
ShortCode
2. Give your Shortcode this tag: libraryh3lp
3. Paste one of your libraryh3lp code snippets in the ShortCode
Template box
4. In your libraryh3lp snippet, replace the ID number with {id}
5. Scroll down to ShortCode Attributes, click the plus button
6. Fill in:
1. Name: id
2. Default Value: 0
7. Click Publish or Update
8. Find the id of the libraryh3lp snippet you want to embed
9. On any WordPress Page, put [libraryh3lp id=“1234”],
replacing your snippet ID as appropriate
27. DON’T TYPE IT OVER AND OVER
Chad Haefele
Interim Head of User Experience
UNC Chapel Hill Libraries
cHaefele@email.unc.edu
Working with Shortcodes in WordPress
Slides:
Notes de l'éditeur
.com – good first playground
.org – the real deal
Shortcodes put the content management in content management system. Text between brackets automatically displays a pre-set chunk of content.
Shortcodes put the content management in content management system. Text between brackets automatically displays a pre-set chunk of content.
Policies
Widgets
Galleries
Show shortcuts in the Add Media screen
Shortcodes put the content management in content management system. Text between brackets automatically displays a pre-set chunk of content.
Shortcodes put the content management in content management system. Text between brackets automatically displays a pre-set chunk of content.