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( have_rows('repeater_field_name') ): ?> | |
<ul class="slides"> | |
<?php while( have_rows('repeater_field_name') ): the_row(); | |
// vars | |
$image = get_sub_field('image'); | |
$content = get_sub_field('content'); | |
$link = get_sub_field('link'); ?> | |
<li class="slide"> <?php if( $link ): ?> |
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 $post_object = get_field('post_object'); | |
if( $post_object ): // override $post | |
$post = $post_object; | |
setup_postdata( $post ); ?> | |
<div> | |
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> | |
<span>Post Object Custom Field: <?php the_field('field_name'); ?></span> | |
</div> |
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 while ( have_posts() ) : the_post(); ?> | |
<div class="main-content"> | |
<div class="main-wrap"> | |
<?php // check for rows (parent repeater) | |
if( have_rows('product_page') ): ?> | |
<div class="col-lg-12 row product-row"> | |
<?php // loop through rows (parent repeater) | |
while( have_rows('product_page') ): the_row(); ?> |
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 foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?> |
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 $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) {echo $tag->name . ' '; }}?> |
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
define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', true ) ); | |
add_filter( 'ot_theme_mode', '__return_true' ); | |
add_filter( 'ot_show_pages', '__return_true' ); | |
require_once ('option-tree/ot-loader.php'); | |
add_filter( 'ot_show_pages', '__return_true' ); |
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
add_filter( 'woocommerce_product_tabs', 'woo_rename_tab', 98);function woo_rename_tab($tabs) {$tabs['description']['title'] = 'Full Description';return $tabs;} |
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
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); function woo_remove_product_tabs( $tabs ) { unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; | |
} |
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 | |
// Sub Title Metabox | |
/** | |
* function to return a custom field value. | |
*/ | |
function wpshed_get_custom_field( $value ) { | |
global $post; |
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 // Custom Pagination for loop | |
function custom_pagination($numpages = '', $pagerange = '', $paged='') { | |
if (empty($pagerange)) { | |
$pagerange = 2; | |
} | |
/** | |
* This first part of our function is a fallback |