function flatsome_next_portfolio() {
global $post;
$next_post = get_next_post(true, '', 'featured_item_category');
if (is_a($next_post, 'WP_Post')) {
$thumbnail_id = get_post_thumbnail_id($next_post->ID);
$permalink = get_the_permalink($next_post->ID);
$title = get_the_title($next_post->ID);
$icon = get_flatsome_icon('icon-angle-right');
echo do_shortcode(
sprintf(
'[ux_banner hover="zoom" height="300px" bg="%s" bg_size="original" link="%s"]
[text_box text_color="dark" width="50" scale="125" padding="20px" position_x="100" position_y="95" text_align="left" bg="rgba(255, 255, 255, 0.5)"]
<p><strong>Next %s</strong></p>
<h3 class="uppercase"><a href="%s">%s</a></h3>
[/text_box]
[/ux_banner]',
$thumbnail_id,
$permalink,
$icon,
$permalink,
$title
)
);
}
}
function flatsome_previous_portfolio() {
global $post;
$prev_post = get_previous_post(true, '', 'featured_item_category');
if (is_a($prev_post, 'WP_Post')) {
$thumbnail_id = get_post_thumbnail_id($prev_post->ID);
$permalink = get_the_permalink($prev_post->ID);
$title = get_the_title($prev_post->ID);
$icon = get_flatsome_icon('icon-angle-left');
echo do_shortcode(
sprintf(
'[ux_banner hover="zoom" height="300px" bg="%s" bg_size="original" link="%s"]
[text_box text_color="dark" width="50" scale="125" padding="20px" position_x="0" position_y="95" text_align="right" bg="rgba(255, 255, 255, 0.5)"]
<p><strong>%s Prev</strong></p>
<h3 class="uppercase"><a href="%s">%s</a></h3>
[/text_box]
[/ux_banner]',
$thumbnail_id,
$permalink,
$icon,
$permalink,
$title
)
);
}
}