Last active
December 11, 2015 14:18
-
-
Save toddmotto/4613107 to your computer and use it in GitHub Desktop.
WordPress shortcode for H tags.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Headings | |
function heading( $atts ) | |
{ | |
extract(shortcode_atts(array( | |
'tag' => '', | |
'text' => '', | |
), $atts)); | |
return '<h' . $tag . '>' . $text . '</h' . $tag . '>'; | |
} | |
add_shortcode('heading', 'heading'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use these in the dashboard editor 'Visual' Panel like so:
[heading tag="1" text="H1 Tag"]
[heading tag="2" text="H2 Tag"]
[heading tag="3" text="H3 Tag"]
... And so on