Home Forums Basel support forum Related Blog Post Option

Related Blog Post Option

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17649

    fazlerabbi
    Participant

    I want to show related posts from category option. In here posts from same category will be displayed. I have solved this isse by putting following code in functions.php in my Basel-Child Theme. But I don’t want to show post excerpt here. If I off post excerpt from theme option, it causes everywhere. Please give me code, I can put here and post excerpt in related post will be off.
    function basel_get_related_posts_args( $post_id ) {
    $taxs = get_the_category($post->ID);
    $args = array();
    if ( $taxs ) {
    $tax_ids = array();
    foreach( $taxs as $individual_tax ) $tax_ids[] = $individual_tax->term_id;

    $args = array(
    ‘category__in’ => $tax_ids,
    ‘post__not_in’ => array( $post_id ),
    ‘showposts’ => 4,
    ‘ignore_sticky_posts’ => 1
    );

    }

    return $args;
    }

    #17653

    Eric Watson
    Participant

    Hello,

    Thank you so much purchasing our theme and contacting our support center.

    Can you provide more information or screenshots? Maybe you want to hide the excerpt in the related carousel? See the screenshot

    https://gyazo.com/a4f1784fbbbfc903e8fefb1358d16732

    Kind Regards
    XTemos Studio

Viewing 2 posts - 1 through 2 (of 2 total)