Menu icons block
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
// add hook | |
add_filter( 'wp_nav_menu_objects', 'my_wp_nav_menu_objects_sub_menu', 10, 2 ); | |
// filter_hook function to react on sub_menu flag | |
function my_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) { | |
// global $wp_query; | |
// console_debug('post is single >>',is_single() ? 'yes' : 'no'); | |
//console_debug('menu',$sorted_menu_items); | |
if (is_single()) { |
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 | |
$location = get_field('location'); | |
if( !empty($location) ): | |
?> | |
<a href="http://www.google.com/maps/preview#!q=<?=urlencode( $location['address'] )?>"> | |
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<?php echo $location['lat']; ?>,<?php echo $location['lng']; ?>&zoom=15&format=png&sensor=false&size=397x297&maptype=roadmap&visual_refresh=true&style=visibility:off&style=feature:road|element:geometry|visibility:simplified&style=feature:landscape|element:geometry|visibility:simplified&style=element:labels|visibility:on&markers=color:red|<?php echo $location['lat']; ?>,<?php echo $location['lng']; ?>"/> | |
</a> | |
<?php endif; ?> |
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
function equalHeight(elem) { | |
var currentTallest = 0, | |
currentRowStart = 0, | |
rowDivs = [], | |
$el, | |
topPosition = 0; | |
$(elem).each(function() { | |
$el = $(this); | |
$($el).height('auto'); | |
topPostion = $el.position().top; |
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
function add_opengraph_markup() { | |
if (is_single()) { | |
global $post; | |
if(get_the_post_thumbnail($post->ID, 'thumbnail')) { | |
$thumbnail_id = get_post_thumbnail_id($post->ID); | |
$thumbnail_object = get_post($thumbnail_id); | |
$image = $thumbnail_object->guid; | |
} else { | |
// set default image | |
$image = ''; // |
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
/** | |
* Requires imagesLoaded | |
* | |
*/ | |
(function($) { | |
$.fluidbricks = function(element, options) { | |
var defaults = { | |
'itemClass': '.element', |
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
git clone --depth 1 https://gist.github.com/d5d78fc32e458d309eab4fb89a258f1b.git social-share; cd social-share ; rm -rf .git |
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
function custom_tiny_mce( $settings ) { | |
$settings['toolbar1'] = 'styleselect,bold,italic,bullist,blockquote,hr,alignleft,aligncenter,link,unlink'; | |
$style_formats = array( | |
array( | |
'title' => 'Content Block', | |
'block' => 'span', | |
'classes' => 'content-block', | |
'wrapper' => true, | |
), | |
array( |
OlderNewer