Displaying Related Posts Based On Custom Field

I’ve created a single program page for a client and they wish to show related programs at the bottom of the page. You can see the page here.

What I’m trying to do is display related programs that match the same age group as the current program (post). I’ve got a custom field called all_included_grades_for_filters . The admin can select what grades the program is a part of (see below)

How can I have it so that the related programs (related posts) looper only displays posts that are within the same age group of the current post? This is the current query string I have so far but it’s not working post_type=summer_programs&year_round_programs&posts_per_page=3&meta key=fields_all_included_grades_for_filters&meta_value={{dc:post:meta key="fields_all_included_grades_for_filters"}}

Hey @santosfel5,

Thanks for reaching out!

Please check this thread, this is similar to your query.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.