How-to add stored information to posts in a category? tag? metadata? sub-cat? (3 posts)

  1. roncrump
    Posted 7 years ago #

    I use WP for a football club web site (newenglandnomads.net).

    Match reports go into the "match report" category. No surprise there.

    I have other information stored that I would like to be able to add automatically to match reports (I already display it on a fixtures/stats page) - detailed score, team list, goal scorers, award winners. This information is specific to a fixture (which can be defined by round and season with fixture date to provide a "belt-and-braces" check).

    So, I can think of three possible approaches to this: entering the three items either as tags (I don't use tags elsewhere), metadata (this seems the best approach to me, maybe but it isn't something I've used previously) or having a sub-category created for each fixture (there are generally 2-4 match reports per fixture).

    I then need to say something along the lines of:
    if post is in category "match reports" then display match information for round-season-date (however that information is held).

    Is metadata the best way to go? Or one of the other routes? I may have misunderstood what custom metadata is intended for.

    Has anyone done anything similar that I might see the code for to shorten the development process?


  2. MichaelH
    Posted 7 years ago #

    As opposed to category/sub-category or even tags, custom fields sound like the right approach.

    There are some useful plugins that make custom fields easier to use:

    I'd review Using Custom Fields then install a test copy of WordPress and play around with custom fields to see if that approach fits your vision.

  3. roncrump
    Posted 7 years ago #

    Cheers. The plugins look like they may well be useful.

Topic Closed

This topic has been closed to new replies.

About this Topic