This file contains hidden or 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
/** | |
* Full Height Sections | |
* This function will expand the sections to the 100% of browser window height. | |
* | |
* Author: Zeshan Ahmed | |
* Author URI: http://www.zeshanahmed.com/ | |
* | |
* Replace '#banner' with your targeted element's selector. | |
*/ |
This file contains hidden or 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
if (window.devicePixelRatio > 1) { | |
/* highDPI display */ | |
} | |
if (window.devicePixelRatio >= 2) { | |
/* retina display */ | |
} |
This file contains hidden or 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 | |
$curl = curl_init(); | |
curl_setopt_array($curl, Array( | |
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/', | |
CURLOPT_USERAGENT => 'spider', | |
CURLOPT_TIMEOUT => 120, | |
CURLOPT_CONNECTTIMEOUT => 30, | |
CURLOPT_RETURNTRANSFER => TRUE, |
This file contains hidden or 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
/** | |
* Extended Sections Animations | |
* By: Zeshan Ahmed | |
* URI: http://www.zeshanahmed.com/ | |
* | |
* Extended animations trigger on scroll. Uses animate.css. | |
*/ | |
.not-animated { | |
opacity: 0; |
This file contains hidden or 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 | |
function prefix_customizer_register( $wp_customize ) { | |
$wp_customize->add_panel( 'panel_id', array( | |
'priority' => 10, | |
'capability' => 'edit_theme_options', | |
'theme_supports' => '', | |
'title' => __( 'Example Panel', 'textdomain' ), | |
'description' => __( 'Description of what this panel does.', 'textdomain' ), |
This file contains hidden or 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 | |
// WooCommerce - Exclude Products from Shop Page using IDs. | |
// ============================================================================= | |
add_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); | |
function custom_pre_get_posts_query( $q ) { | |
if ( ! $q->is_main_query() ) return; |
This file contains hidden or 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 | |
/** | |
* Plugin Name: Envira Gallery - Load Lightbox from Link | |
* Plugin URI: http://enviragallery.com | |
* Version: 1.0 | |
* Author: Tim Carr | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Launch a gallery's lightbox from a link. Requires that the gallery be embedded into the Page. | |
*/ |
This file contains hidden or 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
// Excerpt - Limit Length by Characters and Keep Last Word Complete. | |
// Solution from: | |
// https://wordpress.org/support/topic/limit-excerpt-length-by-characters#post-2248039 | |
// ================================================================================ | |
function excerpt_character_length( $excerpt ){ | |
$permalink = get_permalink($post->ID); | |
$excerpt = get_the_content(); | |
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt); | |
$excerpt = strip_shortcodes($excerpt); |
This file contains hidden or 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 | |
/** | |
* Get the author profile URL | |
**/ | |
$author_id = get_the_author_meta( 'ID' ); | |
$author_url = get_author_posts_url( $author_id ); |