ASTRA_Ext_WooCommerce_Markup::next_previous_links()

Single product next and previous links.


Description


Return

(void) if not a single product.


Source

File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php

		public function next_previous_links() {

			if ( ! is_product() ) {
				return;
			}
			$previous_icon = '<i class="ast-icon-previous"></i>';
			$next_icon     = '<i class="ast-icon-next"></i>';
			if ( true === Astra_Icons::is_svg_icons() ) {
				$previous_icon = '<i class="ast-product-icon-previous">' . Astra_Icons::get_icons( 'arrow' ) . '</i>';
				$next_icon     = '<i class="ast-product-icon-next">' . Astra_Icons::get_icons( 'arrow' ) . '</i>';
			}
			?>
			<div class="product-links">
				<?php
				previous_post_link( '%link', $previous_icon );
				next_post_link( '%link', $next_icon );
				?>
			</div>
			<?php
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.