• Resolved Anonymous User 18318860

    (@anonymized-18318860)


    Hello, I’ve sent a support email about this but have not yet received an email confirmation, so posting this here just in case. (Apologies in advance in case of redundancy.)

    I’m using the “Related Posts” feature on single blog entries, set to use the “Tags” taxonomy.

    Unfortunately, the related posts shown do not appear to have any tags in common (even though several entries per tag exists throughout the blog).

    What am I missing? If anyone would be so kind as to point me to a solution, I’d be most grateful. Thank you kindly in advance!

    • This topic was modified 3 years, 6 months ago by Anonymous User 18318860.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Anonymous User 18318860

    (@anonymized-18318860)

    I found the solution myself. If anyone has the same issue, here’s what worked for me:

    In the theme subfolder “partials/single/”, find “related-posts.php”.

    Change the following lines:

    // Related posts taxonomy
    $bam_related_posts_taxonomy = get_theme_mod( 'bam_related_posts_taxonomy', 'category' );

    To this:

    // Related posts taxonomy
    $bam_related_posts_taxonomy = get_theme_mod( 'bam_related_posts_taxonomy', 'post_tag' );

    And the following lines:

    // Use tag ids
    if ( 'tag' == $bam_related_posts_taxonomy ) {
        $bam_post_args['tag__in'] = $bam_terms_ids; 
    }

    To this:

    // Use tag ids
    if ( 'post_tag' == $bam_related_posts_taxonomy ) {
        $bam_post_args['tag__in'] = $bam_terms_ids; 
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Related Posts issue’ is closed to new replies.