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
$taxonomy = 'blog-category'; | |
$terms = get_terms( | |
$taxonomy, | |
array( | |
'hide_empty' => 1, | |
'parent' => 0 | |
) | |
); | |
// 'parent' => 0 | |
if ($terms) { |
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 | |
$args = array( | |
'post_type' => 'notices-mariners', | |
'post_status' => 'publish', | |
'posts_per_page' => 2, | |
'meta_key' => 'mariners_date_selected', | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC' | |
); |
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 | |
// If needed to get a specific category | |
// echo "<pre>"; | |
// var_dump($wp_query->query_vars); | |
// echo "</pre>"; | |
// echo $wp_query->query_vars['gallery-category']; | |
$args = array( | |
'post_type' => 'document', |
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
// DEVELOPER | |
function dev_template_name() { | |
global $template, $post; | |
$template_array = explode('/',$template); | |
echo ' | |
<style> | |
.dev-template-name {position:fixed;bottom:200px;right:10px;background: rgba(255,0,0,0.6);color:#fff;padding:2px 4px;font-size:0.8em;z-index: 100;/*display: none;*/} | |
</style> |
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
HTML ---- | |
<?php | |
// slideshow | |
$rows = get_field('slideshow_repeater'); | |
if($rows) { | |
echo "<!-- slideshow --> | |
<div id='slideshow' class='full-width clearfix'> |
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
/* | |
* Bootstrap additional grid sizes | |
*/ | |
@media only screen and (min-width: 480px) and (max-width: 991px) { | |
.col-xxs-1, .col-xxs-2, .col-xxs-3, .col-xxs-4, .col-xxs-5, .col-xxs-6, .col-xxs-7, .col-xxs-8, .col-xxs-9, .col-xxs-10, .col-xxs-11, .col-xxs-12 {position: relative;min-height: 1px;padding-right: 15px;padding-left: 15px;float: left;} | |
.col-xxs-12 {width: 100%;}.col-xxs-11 {width: 91.66666667%;}.col-xxs-10 {width: 83.33333333%;}.col-xxs-9 {width: 75%;}.col-xxs-8 {width: 66.66666667%;}.col-xxs-7 {width: 58.33333333%;}.col-xxs-6 {width: 50%;}.col-xxs-5 {width: 41.66666667%;}.col-xxs-4 {width: 33.33333333%;}.col-xxs-3 {width: 25%;}.col-xxs-2 {width: 16.66666667%;}.col-xxs-1 {width: 8.33333333%;} | |
.col-xxs-pull-12 {right: 100%;}.col-xxs-pull-11 {right: 91.66666667%;}.col-xxs-pull-10 {right: 83.33333333%;}.col-xxs-pull-9 {right: 75%;}.col-xxs-pull-8 {right: 66.66666667%;}.col-xxs-pull-7 {right: 58.33333333%;}.col-xxs-pull-6 {right: 50%;}.col-xxs-pull-5 {right: 41.66666667%;}.col-xxs-pull-4 {right: 33.3333333 |
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
/* ------------------------------------ | |
Gravity Forms Bootstrap | |
Help from https://gist.githubusercontent.com/DevinWalker/7110951/raw/8f6863c52df3cc0d627bb1e18e9cb832b5ecf395/gravity-forms_bootstrap | |
https://wordpress.org/plugins/gravity-forms-bootstrap-3-style/ | |
---------------------------------------*/ | |
.gform_wrapper ul{padding-left:0;list-style:none}.gform_wrapper li{margin-bottom:15px}.gform_wrapper form{margin-bottom:0}.gform_wrapper .gfield_required{padding-left:1px;color:#b94a48}.ginput_container input,.ginput_container select,.ginput_container textarea, #theme-my-login input{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.gin |
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
// functions.php | |
// Pagination for paged posts, Page 1, Page 2, Page 3, with Next and Previous Links, No plugin | |
function html5wp_pagination() | |
{ | |
global $wp_query; | |
$big = 999999999; | |
echo paginate_links(array( | |
'base' => str_replace($big, '%#%', get_pagenum_link($big)), | |
'format' => '?paged=%#%', |
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 if(is_post_type_archive('service')): | |
if( ICL_LANGUAGE_CODE == "zh-hans" ) { | |
// $language = "chinese"; | |
$page = 336; | |
} else { | |
// $language = "english"; | |
$page = 95; | |
} | |
echo "<title>".get_post_meta($page, '_yoast_wpseo_title', true)."</title>"; | |
elseif(is_post_type_archive('testimonial')): |
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
body img.gform_ajax_spinner { | |
/*display: none!important;*/ | |
display: block; | |
margin: 10px 0 0 10px; | |
position: relative; | |
top:10px; | |
left:10px; | |
max-width: 16px; | |
} |
OlderNewer