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 class="filter"> | |
<h5>Sort: </h5> | |
<?php | |
$cat_args = array( | |
'taxonomy' => 'inventory_category', | |
'parent' => 0, | |
'number' => 10, | |
'hide_empty' => true | |
); | |
$terms = get_terms($cat_args); |
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
/* | |
* Add custom logo support | |
*/ | |
add_theme_support( 'custom-logo' ); |
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
<a href="<?php the_permalink(); ?>"> | |
<?php the_post_thumbnail( 'full', array('class' => 'card-img-top')); ?> | |
</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
add_action( 'cmb2_admin_init', 'cmb2_sample_metaboxes' ); | |
/** | |
* Define the metabox and field configurations. | |
*/ | |
function cmb2_sample_metaboxes() { | |
// Start with an underscore to hide fields from custom fields list | |
$prefix = '_yourprefix_'; | |
/** |
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
/** | |
* Meta Boxes. | |
*/ | |
require get_template_directory() . '/inc/meta-boxes.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 | |
$text = get_post_meta( get_the_ID(), '_yourprefix_text', true ); | |
$email = get_post_meta( get_the_ID(), '_yourprefix_email', true ); | |
$url = get_post_meta( get_the_ID(), '_yourprefix_url', true ); | |
echo esc_html( $text ); | |
echo is_email( $email ); | |
echo esc_url( $url ); | |
?> |
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 class="entry-video"> | |
<?php | |
$url = get_post_meta( get_the_ID(), 'helpwp_url', true); | |
$yt_id = helpwp_youtube_id($url); | |
if ($url != '') : ?> | |
<div class="embed-responsive embed-responsive-16by9"> | |
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/<?php echo esc_html( $yt_id ); ?>" allowfullscreen></iframe> | |
</div> |
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 | |
$url = get_post_meta( get_the_ID(), 'helpwp_url', true); | |
$yt_id = helpwp_youtube_id($url); | |
if ($url != '') : ?> | |
<a href="<?php the_permalink(); ?>"> | |
<img alt="<?php the_title(); ?>" class="card-img-top" src="https://img.youtube.com/vi/<?php echo esc_html( $yt_id ); ?>/maxresdefault.jpg"> | |
</a> | |
<?php else : ?> |
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 | |
/** | |
* Get the ID of a YouTube Video | |
**/ | |
function helpwp_youtube_id($url){ | |
/* | |
* type1: http://www.youtube.com/watch?v=9Jr6OtgiOIw | |
* type2: http://www.youtube.com/watch?v=9Jr6OtgiOIw&feature=related | |
* type3: http://youtu.be/9Jr6OtgiOIw | |
*/ |
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
/* Posts Navigation */ | |
.pagination { | |
margin-top: 30px; | |
justify-content: center; | |
.page-numbers { | |
border: 1px solid rgba(0,0,0,.2); | |
padding: 8px; | |
border-radius: 3px; |