Last active
November 24, 2018 21:00
-
-
Save jarednova/1958ebe6406e0585c4d5 to your computer and use it in GitHub Desktop.
example of easy shortcodes you can add in functions.php
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
<?php | |
add_shortcode( 'section-break', function($attributes = array(), $content = null) { | |
return '<div class="article-body-section-break"></div>'; | |
} ); | |
add_shortcode( 'email-tease', function($attributes = array(), $content = null) { | |
return Timber::compile('partials/newsletter.twig', array('context_class' => 'newsletter-signup--in-article', 'text' => $content)); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment