Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Creating a Button Shortcode
@laurenpittenger
Slides:
bit.ly/burbswpbuttonshortcode
What We Needed
What Didn’t Work So Well
What Didn’t Work So Well
What Didn’t Work So Well
Shortcode Approach
● Shortcode allows the user to create a button
without knowing how to code
● It can be placed anywhere ...
function mytheme_button ($atts, $content = null) {
$atts = shortcode_atts( array('link' => '', 'color' => ''), $atts);
ret...
Final Result
Future Improvements
Upcoming SlideShare
Loading in …5
×

of

Creating a button shortcode Slide 1 Creating a button shortcode Slide 2 Creating a button shortcode Slide 3 Creating a button shortcode Slide 4 Creating a button shortcode Slide 5 Creating a button shortcode Slide 6 Creating a button shortcode Slide 7 Creating a button shortcode Slide 8 Creating a button shortcode Slide 9
Upcoming SlideShare
Planet interactive Services
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Creating a button shortcode

Download to read offline

In this presentation, I discuss a use case for a WordPress button shortcode & how to make one.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Creating a button shortcode

  1. 1. Creating a Button Shortcode @laurenpittenger Slides: bit.ly/burbswpbuttonshortcode
  2. 2. What We Needed
  3. 3. What Didn’t Work So Well
  4. 4. What Didn’t Work So Well
  5. 5. What Didn’t Work So Well
  6. 6. Shortcode Approach ● Shortcode allows the user to create a button without knowing how to code ● It can be placed anywhere in the content of a post or page as well as in text widgets
  7. 7. function mytheme_button ($atts, $content = null) { $atts = shortcode_atts( array('link' => '', 'color' => ''), $atts); return '<a class="button ' . $color . '" href="' . $link . '">' . do_shortcode($content) . '</a>'; } add_shortcode( 'button', 'mytheme_button' ); The Code Get the code on GitHub: bit.ly/buttonshortcode [button link='http://linktosomething.com' color='orange']My Button Text![/button]
  8. 8. Final Result
  9. 9. Future Improvements

In this presentation, I discuss a use case for a WordPress button shortcode & how to make one.

Views

Total views

343

On Slideshare

0

From embeds

0

Number of embeds

39

Actions

Downloads

3

Shares

0

Comments

0

Likes

0

×