Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $portfolio_nav_direction = get_theme_mod( 'portfolio_nav_direction', 'forward' );
- $next_post = $portfolio_nav_direction === 'forward' ? get_previous_post(true, '', 'arts_portfolio_category') : get_next_post(true, '', 'arts_portfolio_category');
- $current_id = get_the_ID();
- $next_link;
- $next_title;
- $next_image_id;
- $attrs_link = '';
- $portfolio_nav_background = arts_get_overridden_document_option( 'portfolio_nav_background', 'page_portfolio_nav_settings_overridden', 'bg-light-1' );
- $portfolio_nav_theme = arts_get_overridden_document_option( 'portfolio_nav_theme', 'page_portfolio_nav_settings_overridden', 'dark' );
- $portfolio_nav_divider_enabled = arts_get_overridden_document_option( 'portfolio_nav_divider_enabled', 'page_portfolio_nav_settings_overridden', true );
- $portfolio_nav_image_transition_enabled = get_theme_mod( 'portfolio_nav_image_transition_enabled', true );
- $portfolio_nav_scroll_down_enabled = get_theme_mod( 'portfolio_nav_scroll_down_enabled', true );
- $portfolio_nav_scroll_down_label = get_theme_mod( 'portfolio_nav_scroll_down_label', esc_html__( 'Keep Scrolling', 'rhye' ) );
- $portfolio_nav_headings_preset = get_theme_mod( 'portfolio_nav_headings_preset', 'h1' );
- $portfolio_nav_labels_preset = get_theme_mod( 'portfolio_nav_labels_preset', 'subheading' );
- $portfolio_nav_next_label = get_theme_mod( 'portfolio_nav_next_label', esc_html__( 'Next Project', 'rhye' ) );
- $categories = array();
- $current_categories = arts_get_taxonomy_term_names( $current_id, 'arts_portfolio_category' );
- foreach ( $current_categories as $item ) {
- array_push( $categories, $item['slug']);
- }
- $posts = get_posts(
- array(
- 'post_type' => 'arts_portfolio_item',
- 'posts_per_page' => -1,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'arts_portfolio_category',
- 'field' => 'slug',
- 'terms' => $categories, // include only posts of the current categories (slugs)
- )
- )
- )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement