Skip to content

Instantly share code, notes, and snippets.

@simplethemes
simplethemes / Column Shortcode
Created August 11, 2011 07:42
Insert fraction-based layouts with this shortcode.
// Three Columns Example
[one_third]
Column One - Add anything you want here
[/one_third]
[one_third]
Column Two - Add anything you want here
[/one_third]
[one_third_last]
Column Three - Add anything you want here
[/one_third_last]
@simplethemes
simplethemes / CSS3 Button
Created August 11, 2011 07:44
CSS3 Button Shortcode
[button align="center" color="white" size="small" link="http://www.simplethemes.com"]Small Button[/button]
@simplethemes
simplethemes / Skeleton Layout Hooks
Created August 11, 2011 16:38
functions that control the general layout containers
* st_header // Opening header tag and logo/header text
* st_header_extras* // Additional content may be added to the header
* st_navbar // Opening navigation element and WP3 menus
* st_before_content // Opening content wrapper
* st_after_content // Closing content wrapper
* st_before_sidebar // Opening sidebar wrapper
* st_after_sidebar // Closing sidebar wrapper
* st_before_footer // Opening footer wrapper
* st_footer // The footer (includes sidebar-footer.php)
* st_after_footer // The closing footer wrapper
@simplethemes
simplethemes / Toggles Shortcode
Created August 12, 2011 18:26
Insert toggle panes in content with this shortcode.
[toggle title="Button text One"]
Toggle Content One
[/toggle]
[toggle title="Button Text Two"]
Toggle Content Two
[/toggle]
[toggle title="Button Text Three"]
Toggle Content Three
[/toggle]
@simplethemes
simplethemes / Callout Shortcode
Created August 14, 2011 05:59
Adds a styled callout to your content.
[callout align="center" width="400"]
This is a 400px centered callout box
[/callout]
[callout align="left" width="200"]
This is a 200px left aligned callout box
[/callout]
[callout align="right" width="100"]
This is a 100px right aligned callout box
@simplethemes
simplethemes / slideshow_shortcode
Last active September 27, 2015 06:48
Slideshow Shortcode
// Standard Slideshow Parameters
[slideshow effect="slide" category="17" autoplay="false" width="620" height="250" speed="1000" pagination="true" prevnext="true"]
// Content Slideshow Parameters
[contentslides effect="slide" thumbsize="200,150" display="content" type="category" ids="1" width="600" height="320" autoplay="3000" speed="700" length="4" readmore="false"]
add_action('wp-routes/register_routes', function(){
with('/location-api', function(){
respond('GET', '/[i:id]', function($request){
$post = get_post($request->id);
// $post = get_posts(array('post_type' => 'location'));
header('Content-Type: application/json');
if ($post) {
$fields = array(
'post_id' => $post_id = $post->ID,
'title' => $post->post_title,
@simplethemes
simplethemes / acf_toolbars_functions.php
Created October 20, 2015 21:51
Add toolbars to ACF
<?php
if (! function_exists('st_acf_toolbars')) {
function st_acf_toolbars() {
// Full
$toolbars['Full'] = array();
$toolbars['Full'][1] = apply_filters('mce_buttons', array('code','bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'justifyleft', 'justifycenter', 'justifyright', 'link', 'unlink', 'wp_more', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id);
$toolbars['Full'][2] = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'justifyfull', 'forecolor', 'pastetext', 'pasteword', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo'), $editor_id);
$toolbars['Full'][3] = apply_filters('mce_buttons_3', array(), $editor_id);
<?php
add_action('kronos_header','site_header',1);
function site_header() { ?>
<div class="wrap header-wrap">
<div class="header-container">
<div class="site-header">
<h1 class="site-title">
<a title="<?php echo get_bloginfo( 'description' );?>" href="<?php echo esc_url(home_url('/'));?>" rel="home"><?php echo get_bloginfo( 'name' );?></a>
</h1>
<?php do_action('kronos_show_menu','primary'); ?>
@simplethemes
simplethemes / gist:5036890
Created February 26, 2013 08:13
Pricing Page Example Markup
<h1 class="center remove-bottom">Feature Product Pricing Table</h1>
<h3 class="center remove-top">Example Demo with Options</h3>
[break]
[one_third]
[callout style="white" align="center" centertitle="true" title="Product One"]
<ul class="check nopad">
<li class="yes">Item One</li>
<li class="yes">Item Two</li>
<li class="no">Item Three</li>
<li class="no">Item Four</li>