Wordpress Shortcode
-
Upload
binh-dang-ngoc -
Category
Software
-
view
162 -
download
0
description
Transcript of Wordpress Shortcode
Problems for users: Style
Problems for users: Layout
Problems: Html/css code
• WordPress user with minimal html experience spend too much time trying to create and format content
Outline
• What Shortcode ?
• Why Shortcode ?
• Layout & Style with Shortcode
• Shortcode on Widget
• Some useful Shortcode
• Shortcode Best practices
• Create Shortcode for your own
• Q/A
What is shortcode ?Very simple code use in post’s content to create special things
What is shortcode?
• Shortcode is [Tag]
• May be have enclose tag like this: [tag]content[/tag]
• May be have attributes like this: [tag attribute1=“abc”]
• Many be in other shortcode:
[tag-parent]
[tag-child]
[/tag-parent]
Demo1:
• Create your button like this
Demo 2 –Home page
• Theme setup & not setup
• Setup ? You can’t change layout ?
• Layout with shortcode!
Create it with shortcode!
Demo
Why Shortcode ?
• Easy use to format content
• It’s text, It can use any where (Page/Post/Widget)
• It’s simple
• It’s easy to create
• Clean up your post’s content
Built-in shortcode
• [gallery]
• [audio]
• [caption]
• [embed]
• [video]
[gallery id=“99]
Pretty your content!
• Click Bump
• WP Canvas
• Shortcode Ultimate
Shortcode on Widget
Turn on Widget Short code
• Solution 1: for Devadd_filter( 'widget_text', 'shortcode_unautop' );
add_filter( 'widget_text', 'do_shortcode' );
• Solution 2: for User
Install plugin:
+ Ultimate Short code
+ Short code Widget
Useful Shortcodes
Useful Shortcodes
WP Canvas - Shortcodes
Useful Shortcodes
Meta Slider
So many
Create Shortcode for yourown
• WP User:
• Shortcoder Plugin
• WP Developer:
• http://generatewp.com/shortcodes/
Best practices with Shortcode
• Don’t use shortcode in theme.
• When you change theme ? Use plugin
• Hide broken shortcodes: Hide Broken Shortcodes Plugin
What will we do?
• Play with shortcode
Q/AAsk and you have answers