Skip to content

Instantly share code, notes, and snippets.

@mitchellkrogza
Created February 21, 2022 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellkrogza/42663d05d2498cc2a847ed03815d62b4 to your computer and use it in GitHub Desktop.
Save mitchellkrogza/42663d05d2498cc2a847ed03815d62b4 to your computer and use it in GitHub Desktop.
Flatsome Theme - Disable Product Navigation Thumbnails
if(!function_exists('flatsome_next_post_link_product')) {
function flatsome_next_post_link_product() {
global $post;
$next_post = get_next_post(true,'','product_cat');
if ( is_a( $next_post , 'WP_Post' ) ) { ?>
<li class="prod-dropdown has-dropdown">
<a href="<?php echo get_the_permalink( $next_post->ID ); ?>" title="View Previous Product" rel="next" class="button icon is-outline circle">
<?php echo get_flatsome_icon('icon-angle-left'); ?>
</a>
</li>
<?php }
}
}
if(!function_exists('flatsome_previous_post_link_product')) {
function flatsome_previous_post_link_product() {
global $post;
$prev_post = get_previous_post(true,'','product_cat');
if ( is_a( $prev_post , 'WP_Post' ) ) { ?>
<li class="prod-dropdown has-dropdown">
<a href="<?php echo get_the_permalink( $prev_post->ID ); ?>" title="View Next Product" rel="next" class="button icon is-outline circle">
<?php echo get_flatsome_icon('icon-angle-right'); ?>
</a>
</li>
<?php }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment