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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Google Map Api</title> | |
</head> | |
<body onLoad="initialize();"> <!-- Initialize the MAP --> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&v=3.9"></script> <!-- Use version 3.9 || Cusom icon friendly --> |
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 terms_shortcode($atts) { | |
ob_start(); | |
$atts = shortcode_atts( | |
array( | |
'page_id' => '', | |
'prefix' => '', | |
), $atts |
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
/* IN YOUR TEMPLATE FILE ABOVE THE HEADER CALL */ | |
add_action( 'body_class', 'add_my_bodyclass'); | |
function add_my_bodyclass( $classes ) { | |
global $post; | |
$condition = get_post_meta( $post->ID, 'METABOX_ID', true ); | |
// Some condition to compare / check | |
if ( ! EMPTY( $conditon ) ) : |
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 | |
add_filter('manage_posts_columns', 'posts_columns_id', 5); | |
add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2); | |
add_filter('manage_pages_columns', 'posts_columns_id', 5); | |
add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2); | |
function posts_columns_id($defaults){ $defaults['make_post_id'] = __('ID'); | |
return $defaults; | |
} | |
function posts_custom_id_columns($column_name, $id){ | |
if($column_name === 'make_post_id'){ |
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
<a class="btn" data-popup-open="popup-1" href="#">Open Popup #1</a> | |
<div class="popup" data-popup="popup-1"> | |
<div class="popup-inner"> | |
<h2>Wow! This is Awesome! (Popup #1)</h2> | |
<p>Donec in volutpat nisi. In quam lectus, aliquet rhoncus cursus a, congue et arcu. Vestibulum tincidunt neque id nisi pulvinar aliquam. Nulla luctus luctus ipsum at ultricies. Nullam nec velit dui. Nullam sem eros, pulvinar sed pellentesque ac, feugiat et turpis. Donec gravida ipsum cursus massa malesuada tincidunt. Nullam finibus nunc mauris, quis semper neque ultrices in. Ut ac risus eget eros imperdiet posuere nec eu lectus.</p> | |
<p><a data-popup-close="popup-1" href="#">Close</a></p> | |
<a class="popup-close" data-popup-close="popup-1" href="#">x</a> | |
</div> | |
</div> |
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 clean($string) { | |
$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. | |
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. | |
return strtolower($string); | |
} | |
// USE | |
echo clean('This is going to be cleaned!'); // Result this-is-going-to-be-cleaned |
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 | |
/* | |
* CHECK LINKS FOR HTTP | |
*************************************************************/ | |
function addScheme($url, $scheme = 'http://') { | |
return parse_url($url, PHP_URL_SCHEME) === null ? | |
$scheme . $url : $url; | |
} |
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 | |
global $prefix; | |
$popup_switch = rwmb_meta("popup_switch"); | |
if ( $popup_switch == 1 ) : | |
$popup_image = rwmb_meta( "{$prefix}popup_image", array( 'size' => 'popup' ) ); | |
$popup_title = rwmb_meta("{$prefix}popup_title"); | |
$popup_desc = rwmb_meta("{$prefix}popup_desc"); | |
$popup_button = rwmb_meta("{$prefix}popup_button"); | |
$button_link = rwmb_meta("{$prefix}button_link"); | |
$button_url = ( $button_link == 'internal' ) ? get_the_permalink(rwmb_meta("{$prefix}popup_button_internal")) : rwmb_meta("{$prefix}popup_button_external"); |
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
%title-style { | |
&:after { | |
content: ''; | |
position: absolute; | |
bottom: 0; | |
width: px(58); | |
height: px(4); | |
} | |
position: relative; | |
padding-bottom: 1rem; |
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
$('.number').waypoint(function(){ | |
function startCounter(){ | |
$('.counter').each(function (index) { | |
var size = $(this).text().split(".")[1] ? $(this).text().split(".")[1].length : 0; | |
$(this).prop('Counter',0).animate({ | |
Counter: $(this).text() | |
}, { | |
duration: 5000, | |
easing: 'swing', | |
step: function (now) { |
OlderNewer