Skip to content

Instantly share code, notes, and snippets.

@jarednova
Last active November 24, 2018 21:00
Show Gist options
  • Save jarednova/1958ebe6406e0585c4d5 to your computer and use it in GitHub Desktop.
Save jarednova/1958ebe6406e0585c4d5 to your computer and use it in GitHub Desktop.
example of easy shortcodes you can add in functions.php
<?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