Show posts based on Custom field value? (2 posts)

  1. Kargo
    Posted 5 years ago #

    Hey everyone, I have a news website that focuses on news from different countries. I have a custom field name called 'country' and the values being the country names. When writing posts I have a dropdown menu that lists the values of the country custom field.

    I'm in the process of giving each country their own information page and ideally I would like to have a section titled "Recent news for country" but I just wanted to know whether their is some PHP code I can add that will generate a list of posts based on a custom field value? (For example if the value was Albania I would like a list of 5 posts that have been published with the value "Albania" selected)

    I would really appreciate it if someone could let me know if its possible and what I would need to do to achieve it :)


  2. esmi
    Forum Moderator
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic