• How would I go about displaying posts from all categories on a blog page, while using categories to display the city in which posts were written via custom fields

    I’m using a post archive page to display the five most recent posts – the category name, and nav link are called “Blog”. However, currently only posts categorized under “Blog” will show on this page.

    I the five most recent posts from ALL categories displayed, with the ability to use categories to display the city where the post was written in the by line. I know this is possible with custom fields.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • post1, category = xyz, custom field key = city, custom field value = Reno
    post2, category = xyz, custom field key = city, custom field value = Las Vegas
    post3, category = xyz, custom field key = city, custom field value = London
    post4, category = xyz, custom field key = city, custom field value = New York
    post5, category = xyz, custom field key = city, custom field value = Reno
    post6, category = xyz, custom field key = city, custom field value = Reno
    post7, category = xyz, custom field key = city, custom field value = Las Vegas
    post8, category = xyz, custom field key = city, custom field value = London
    post9, category = xyz, custom field key = city, custom field value = New York
    post10, category = xyz, custom field key = city, custom field value = Reno

    Please describe how those posts are to be sorted and displayed.

    Thread Starter orbital2000

    (@orbital2000)

    The exact setup I’m looking for can be found at https://www.georgiapellegrini.com. Check out the blog section.

    I’m converting this site into a WP theme – the in-progress url is https://www.georgiapellegrini.com/wordpress

    The issue is, the original site was built by someone who didn’t know WP very well. I can’t figure out how posts are being displayed here, as there is no “Blog” category, or “Blog” page in WP admin, but there is a “Blog” link in the nav bar. The “Blog” section on the original site pulls posts from all categories. Categories are typically the city in which the post was written – the cities are displayed in the byline via custom fields.

    My question: How can I convert this setup to a proper WP structure?

    Categories are typically the city in which the post was written – the cities are displayed in the byline via custom fields.

    Isn’t that redundant?

    But if you want the posts ordered by custom fields then look at the query_posts(), orderby=meta_value argument.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show posts from all categories on “Blog” page’ is closed to new replies.