Skip to content

Instantly share code, notes, and snippets.

function site_header() { ?>
<div class="page-wrap">
<div class="site-header">
<div class="container">
<div id="navtoggle">
<a href="#"><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></a>
</div>
<div id="tel">
<a href="tel:+12056036118">205.603.6118</a>
</div>
@simplethemes
simplethemes / latest-shortcode
Created June 27, 2014 20:12
Latest Shortcode Parameters
/*-----------------------------------------------------------------------------------*/
//
// Latest Posts
// Shortcode Parameters:
//
/*-----------------------------------------------------------------------------------*/
// excerpt="true|false" ------ display the excerpt or 'more' tag break
// length="50" ------ excerpt word length
// thumbs="true|false" ------ display featured thumbnail
// width="50" ------ featured thumbnail width
@simplethemes
simplethemes / embed
Last active August 29, 2015 14:03
Video Embed
//Super Anti-Youtube Embed
http://www.youtube.com/embed/HJSxwwZI4XI?rel=0&amp;vq=hd720&amp;version=3&amp;theme=dark&amp;modestbranding=1&amp;showinfo=0&amp;border=0&amp;autohide=1&amp;autoplay=1&amp;controls=0&amp;enablejsapi=1
//Vimeo
http://player.vimeo.com/video/33110953?autoplay=1&byline=0&badge=0&portrait=0&title=0&color=EEEEEE
<?php
$start = "11:00 am";
$end = "12:30 pm";
$current_time = date('h:i a');
$date1 = DateTime::createFromFormat('h:i a', $current_time);
$date2 = DateTime::createFromFormat('h:i a', $start);
$date3 = DateTime::createFromFormat('h:i a', $end);
<?php
/**
* Lightfast Child Theme
*
*/
function st_remove_wrapper() {
// removes the opening div#wrap
remove_action('skeleton_header','skeleton_mainwrap_open');
function element_transport_theme_mods() {
global $wpdb;
$themedata = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", 'element'));
if ($themedata) {
$wpdb->update(
$wpdb->options, // table
array( 'option_value' => $themedata ), // column => data
array( 'option_name' => 'elementchild' ) // where column
);
function st_transport_theme_mods() {
global $wpdb;
$themetitle = 'synapse';
$themedata = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", $themetitle));
if ($themedata) {
$wpdb->update(
$wpdb->options, // table
array( 'option_value' => $themedata ), // column => data
array( 'option_name' => $themetitle.'child' ) // where column
function skeleton_header_open() {
echo '<div id="header">';
echo '<div class="topbar">';
// phone number
echo '<span class="tel">1.800.555.1212</span>';
// search form
get_search_form(true);
echo '<ul class="header_social_icons">';
// Add your social icons below
echo '<li><a href="http://twitter.com"><i class="fa fa-twitter"></i></a></li>';
// Enqueue the Slick slider CSS
function child_css() {
wp_enqueue_style('slick', get_stylesheet_directory_uri().'/slick/slick.css', array('style'), '1.0', 'screen, projection');
wp_enqueue_style('slick-theme', get_stylesheet_directory_uri().'/slick/slick-theme.css', array('style'), '1.0', 'screen, projection');
}
add_filter( 'add_stylesheets','child_css' );
// Enqueue the Slick slider Javascripts
function child_scripts() {
wp_enqueue_script('slick', get_stylesheet_directory_uri()."/slick/slick.min.js",array('jquery'),'1.0',false);
//on line #159 change:
// hook to add additional stylesheets from a child theme
echo apply_filters ('child_add_stylesheets',$stylesheets);
//to:
// hook to add additional stylesheets from a child theme
apply_filters ('child_add_stylesheets',$stylesheets);