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
{% if contents.total_page_count > 1 %} | |
<div class="blog-pagination"> | |
{% set page_list = [-2, -1, 0, 1, 2] %} | |
{% if contents.total_page_count - current_page_num == 1 %}{% set offset = -1 %} | |
{% elif contents.total_page_count - current_page_num == 0 %}{% set offset = -2 %} | |
{% elif current_page_num == 2 %}{% set offset = 1 %} | |
{% elif current_page_num == 1 %}{% set offset = 2 %} | |
{% else %}{% set offset = 0 %}{% endif %} | |
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
/** | |
* wps_nested_shortcodes_products_display | |
* | |
* Place this in functions.php | |
*/ | |
function wps_nested_shortcodes_products_display( $atts ) { | |
$a = shortcode_atts( array( | |
'types_shortcode' => '', | |
'show_featured_only' => '', |
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 | |
/** | |
* wps_rewrite_post_type_args | |
* | |
* Retains the permalink structure if a custom permalink structure is | |
* set within Wordpress. | |
* | |
* @param array $args Wordpress post type arguments. | |
* @param string $post_type The post type's slug. | |
* @param array $settings The plugin settings data pulled in from the DB. |