View scripts.js
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' | |
}); | |
}); |
View taxonomy.php
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 | |
) | |
); |
View category.php
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; ?> |
View post-type.php
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
// Post type 'expertise' | |
add_action( 'init', 'create_expertise_post_type', 4 ); | |
function create_expertise_post_type() | |
{ | |
$labels = array( | |
'name' => __( 'Expertise' ), | |
'singular_name' => __( 'Expertise' ), | |
'add_new' => __( 'Add New' ), | |
'add_new_item' => __( 'Create New' ), | |
'edit' => __( 'Edit' ), |
View .htaccess
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] |
View functions.php
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; | |
} |
View functions.php
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; | |
} |
View index.html
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> |
View config.json
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" | |
} | |
] | |
}, | |
{ |
View script.js
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": [ | |
{ |
NewerOlder