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
$(window).load( function(){ | |
/* Get toggle effect on header menu */ | |
/* preparation: wrap menu text with <span> tag and add empty span tag */ | |
$("#menu-primary-menu>li.menu-item>a").each( function(){ | |
$(this).contents().eq(0).wrap('<span class=\"menu-text-switch\">'); | |
}); | |
/* Fixing width so menu item didn't change width */ | |
$("#menu-primary-menu>li.menu-item").each( function(){ | |
//distinguish between two header menu modes | |
if($(window).width() > 768){ |
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
/*1. Hide the content when not inside*/ | |
.menu-footer-menu-container .menu-item-type-post_type, | |
.menu-footer-menu-container .menu-item-type-taxonomy{ | |
overflow: hidden; | |
} | |
/*2. Specify transition */ | |
.menu-footer-menu-container .menu-item-type-post_type a, | |
.menu-footer-menu-container .menu-item-type-taxonomy a{ | |
display: inline-block; | |
transition: all 0.3s; |
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
.menu-item-type-post_type, | |
.menu-item-type-taxonomy{ | |
position: relative; | |
display: inline-block; | |
/*to hide contentt*/ | |
overflow: hidden; | |
} | |
.menu-item-type-post_type a, | |
.menu-item-type-taxonomy a{ |
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
# Getting Flickr's photos in an album | |
# Input Parameters: | |
# api_key | |
# user_id | |
# photoset_id | |
# | |
# Output: | |
# A text file with many wordpress embed codes | |
# | |
# steps: |
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 if(!empty( $featured_posts )): ?> | |
<?php $carousel_id ="featuredCarousel"; ?> | |
<div class="cat-carousel-wrapper"> | |
<div class="my-carousel-1"> | |
<div class="carousel-header"> | |
<h2>Featured Posts</h2> | |
</div> | |
<div id="<?php echo $carousel_id; ?>" class="carousel slide" data-ride="carousel"> | |
<!-- Indicators --> |
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
//get category id | |
$cat_id = get_cat_id(single_cat_title("",false)); | |
$featured_IDs = array(); | |
//get the three manual IDs | |
for($i = 0; $i < 3; $i++){ | |
$field_name = 'featured_post_id_'.($i+1); | |
$feat_ID = get_field($field_name,'category_'.$cat_id); | |
if($feat_ID && (intval($feat_ID) > 0) && (get_post_status($feat_ID) == 'publish')){ |
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 $loop = new WP_Query( array( 'post_type' => 'tutorial', 'orderby' => 'post_id', 'order' => 'DSC','posts_per_page' => -1 ) ); ?> | |
<?php if ( $loop->have_posts() ) : ?> | |
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> | |
<div class="row tutorial-list"> | |
<a href="<?php echo esc_url(get_permalink()); ?>" > | |
<span class="link-spanner"></span> | |
</a> | |
<div class="col-sm-3"> | |
<h4><?php the_field('type'); ?></h4> | |
</div> |