false, 'hide-sticky' => false, 'in-same-term' => false, ); $opts_single_post_nav = mfn_opts_get('prev-next-nav'); if (is_array($opts_single_post_nav)) { if (isset($opts_single_post_nav['hide-header'])) { $single_post_nav['hide-header'] = true; } if (isset($opts_single_post_nav['hide-sticky'])) { $single_post_nav['hide-sticky'] = true; } if (isset($opts_single_post_nav['in-same-term'])) { $single_post_nav['in-same-term'] = true; } } $post_prev = get_adjacent_post($single_post_nav['in-same-term'], '', true, 'portfolio-types'); $post_next = get_adjacent_post($single_post_nav['in-same-term'], '', false, 'portfolio-types'); $portfolio_page_id = mfn_opts_get('portfolio-page'); // categories $aCategories = array(); $terms = get_the_terms(get_the_ID(), 'portfolio-types'); if (is_array($terms)) { foreach ($terms as $term) { $aCategories[] = $term->term_id; } } // post classes $classes = array(); if (get_post_meta(get_the_ID(), 'mfn-post-slider-header', true)) { $classes[] = 'no-img'; } if (! mfn_opts_get('portfolio-single-title')) { $classes[] = 'no-title'; } if (mfn_opts_get('share') == 'hide-mobile') { $classes[] = 'no-share-mobile'; } elseif (! mfn_opts_get('share')) { $classes[] = 'no-share'; } if (mfn_opts_get('share-style')) { $classes[] = 'share-'. mfn_opts_get('share-style'); } // translate $translate['published'] = mfn_opts_get('translate') ? mfn_opts_get('translate-published', 'Published by') : __('Published by', 'betheme'); $translate['at'] = mfn_opts_get('translate') ? mfn_opts_get('translate-at', 'at') : __('at', 'betheme'); $translate['categories'] = mfn_opts_get('translate') ? mfn_opts_get('translate-categories', 'Categories') : __('Categories', 'betheme'); $translate['all'] = mfn_opts_get('translate') ? mfn_opts_get('translate-all', 'Show all') : __('Show all', 'betheme'); $translate['related'] = mfn_opts_get('translate') ? mfn_opts_get('translate-related', 'Related posts') : __('Related posts', 'betheme'); $translate['readmore'] = mfn_opts_get('translate') ? mfn_opts_get('translate-readmore', 'Read more') : __('Read more', 'betheme'); $translate['client'] = mfn_opts_get('translate') ? mfn_opts_get('translate-client', 'Client') : __('Client', 'betheme'); $translate['date'] = mfn_opts_get('translate') ? mfn_opts_get('translate-date', 'Date') : __('Date', 'betheme'); $translate['website'] = mfn_opts_get('translate') ? mfn_opts_get('translate-website', 'Website') : __('Website', 'betheme'); $translate['view'] = mfn_opts_get('translate') ? mfn_opts_get('translate-view', 'View website') : __('View website', 'betheme'); $translate['task'] = mfn_opts_get('translate') ? mfn_opts_get('translate-task', 'Task') : __('Task', 'betheme'); $button_text = $translate['readmore']; ?>
>
'. wp_kses(get_the_title(), mfn_allowed_html()) .''; } ?>
post_excerpt) { echo '

'. wp_kses($caption, mfn_allowed_html('caption')) .'

'; } ?>
    '. esc_html($translate['client']) .''. esc_html($client) .''; } // date if (isset($single_meta['date'])) { echo ''; } // website if ($link = get_post_meta(get_the_ID(), 'mfn-post-link', true)) { echo ''; } // task if ($task = get_post_meta(get_the_ID(), 'mfn-post-task', true)) { echo '
  • '. esc_html($translate['task']) .''. esc_html($task) .'
  • '; } ?>
show(); ?>
'
', 'after' => '
', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number' )); ?>
'portfolio', 'tax_query' => array( array( 'taxonomy' => 'portfolio-types', 'field' => 'term_id', 'terms' => $aCategories ), ), 'post__not_in' => array( get_the_ID() ), 'posts_per_page' => $related_count, 'order' => mfn_opts_get( 'portfolio-order', 'DESC' ), 'orderby' => mfn_opts_get( 'portfolio-orderby', 'date' ), 'post_status' => 'publish', 'no_found_rows' => true, 'ignore_sticky_posts' => true, ); $query_related_posts = new WP_Query($args); if ($query_related_posts->have_posts()) { echo ''; } wp_reset_postdata(); } ?>