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
$(".content img").on("click", function(){ | |
$.fancybox.open ({ | |
src : $(this).attr('src'), | |
type : '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
<?php | |
$taxonomyTerm = get_terms( | |
'custom_taxonomy_name', | |
array( | |
'parent'=> 0, | |
'orderby' => 'date', | |
'hide_empty' => 0, | |
'number' => 3 //Number of items | |
) | |
); |
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 $categories = get_the_category(); | |
echo $categories[0]->name; ?> |
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 get_child_terms_function($postid=null,$taxonomy){ | |
if ($postid === null) | |
return false; | |
$terms=wp_get_post_terms($postid,$taxonomy); | |
if($terms){ | |
foreach ( $terms as $term ) { | |
if($term->parent!='0') $termarr[]=$term; | |
} |
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 get_parent_terms_function($postid=null,$taxonomy){ | |
if ($postid === null) | |
return false; | |
$terms=wp_get_post_terms($postid,$taxonomy); | |
if($terms){ | |
foreach ( $terms as $term ) { | |
if($term->parent=='0') $termarr[]=$term; | |
} |
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
[ | |
{ | |
"elementType": "geometry", | |
"stylers": [ | |
{ | |
"color": "#ebe3cd" | |
} | |
] | |
}, | |
{ |
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
<div id="map"></div> | |
<script src="https://maps.googleapis.com/maps/api/js?key=[YOUR-API-KEY-HERE]&callback=initMap" async defer></script> |
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 initMap() { | |
// Styles a map in night mode. | |
var map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: 40.674, lng: -73.945}, | |
zoom: 12, | |
styles: | |
[{ | |
"elementType": "geometry", | |
"stylers": [ | |
{ |
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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] |
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
[ | |
{ | |
"id" : "0", | |
"url" : "https://sample.com/url/", | |
"picture" : "assets/img/placeholder.jpg", | |
"role" : "Role Here", | |
"name" : "John Doe", | |
"expertise" : "Expertise here", | |
"searchfield" : "John Doe Role Here Expertise here" | |
}, |
NewerOlder