• Resolved Huu Minh

    (@huu-minh)


    This is a great plugin. I’ve been using it for 3 years now without a problem. Today I decided to add some related posts on the homepage as well as category, but it doesn’t work. Related posts only appear on single posts. Do you have any idiea?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    Related posts only work on a post or page as it needs the title and content to find the related posts.

    On the homepage, it will only display for each post that is displayed. It might not work in case your theme doesn’t use the_excerpt or the_content filters when displaying the homepage.

    Thread Starter Huu Minh

    (@huu-minh)

    Hi Ajay,

    Thank you for your quick reply. I’m using Divi theme. So I tried to go to my Divi option and enable “Use excerpts when defined” option, then paste some summary into the Excerpt field for my first post, but related posts still don’t show for that post. Am I missing something Ajay? Thank you for the great plugin by the way. I used other related post plugins but yours is the best.

    • This reply was modified 4 years, 10 months ago by Huu Minh. Reason: typo
    Plugin Author Ajay

    (@ajay)

    I assumed you ticked the “Automatically add” option to include homepage in the settings page.

    Can you please also add this code to your theme’s functions:

    
    add_filter( 'the_excerpt', 'crp_content_filter' );
    

    Please check that divi has this filter – or alternatively you can use the filter that Divi uses for generating their excerpt

    • This reply was modified 4 years, 10 months ago by Ajay.
    Thread Starter Huu Minh

    (@huu-minh)

    You’re awsome. I just added your code to my theme’s functions ane it worked like a charm. Thank you so much Ajay. ??

    Plugin Author Ajay

    (@ajay)

    Thank you for confirming – am glad the plugin is working well ??

    I think I need to once again add this setting back into the code

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Related posts don’t show on homepage’ is closed to new replies.