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 | |
// Taxonomy Object | |
$gift_guide_products = get_field('gift_guide_collection'); | |
$args = array( | |
'post_type' => 'product', | |
'posts_per_page' => 12, | |
'tax_query' => array( | |
array( | |
// Custom Taxonomy | |
'taxonomy' => 'gift-guide-collection', |
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 | |
// convert to timber | |
$current_post_id = get_the_ID(); | |
$current_post_cats = get_the_category(); | |
$current_post_first_cat_id = $current_post_cats[ 0 ]->term_id; | |
$args = array( | |
'cat' => $current_post_first_cat_id, |
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 | |
use Timber\Timber; | |
$context = Timber::get_context(); | |
$context['post'] = $post; | |
$post = new TimberPost(); | |
Timber::render( array( | |
'core/page-' . $post->post_name . '.twig', | |
'core/page.twig' ), |
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 | |
/** | |
* Template Name: Blog | |
**/ | |
global $paged; | |
if (!isset($paged) || !$paged){ | |
$paged = 1; | |
} |
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
/* Vertical align | |
https://chriswrightdesign.com/experiments/flexbox-adventures/# | |
*/ | |
.d-flex-vertical { | |
/* Tell flexbox to start vertically from the center */ | |
align-items:center; | |
display:flex; | |
/* I'm also aligning it horizontally */ | |
justify-content:center; |
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="accordion" role="tablist" aria-multiselectable="true"> | |
<?php if( have_rows('service_accordion', 'options') ): ?> | |
<?php $i=0; while ( have_rows('service_accordion', 'options') ) : the_row(); ?> | |
<?php $string = sanitize_title( get_sub_field('service_title', 'options') ); | |
$service_content = get_sub_field('service_content', 'options'); ?> | |
<div class="card"> | |
<div class="card-header" role="tab" id="headingTwo"> | |
<h5 class="mb-0"> | |
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#<?php echo $string ?>" aria-expanded="false" aria-controls="<?php echo $string ?>"> | |
<?php the_sub_field('service_title', 'options'); ?> |
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 = rwmb_meta( 'gt_meta_value', 'type=taxonomy&taxonomy=category' ); | |
$cat_num = get_post_meta($post->ID, 'gt_cat_num', TRUE); | |
foreach ( $categories as $category ){ | |
$cat_ids[] = $category->term_id; | |
} | |
$i = 1; | |
if ( get_query_var('paged') ) { | |
$paged = get_query_var('paged'); | |
} else if ( get_query_var('page') ) { |