WordPress.org

Ready to get started?Download WordPress

Forums

how to properly structure online news content (4 posts)

  1. wpgit
    Member
    Posted 10 months ago #

    hi,

    i am creating a small newspaper site using wordpress but am having some problems with structuring the content.

    for example, in the 'world' custom post type there will be a custom taxonomy called regions: 'USA', 'UK', 'ASIA' etc

    then, i will have custom taxonomy called topics: 'POLITICS', 'BUSINESS', 'TECH' etc.

    the problem i am having is this: if i a person is in the region 'USA' and clicks on the topic "POLITICS' then how can they be directed to posts about politics in the 'USA' only, and not a general archive page which in includes 'POLITICS' from other regions as well?

    any help would be much appreciated. thanks!

  2. Ryan Love
    Member
    Posted 10 months ago #

  3. Ryan Love
    Member
    Posted 10 months ago #

    Or - http://wordpress.org/plugins/menu-rules/

    By the way I found this by searching for "conditional menus" in the plugins directory, if the three plugins above don't do what you need, it's worth going through the search results,

    http://wordpress.org/plugins/search.php?q=conditional+menus

    Ryan,

    P.S.
    Would love an update on if you get this working and what you do, looks like a pretty cool way of doing things.

  4. Rod Whiteley
    Member
    Posted 10 months ago #

    I haven't tried this myself, but my first thought is that one way might be to imagine a slug, say news, that doesn't correspond to any existing page. A URL like http://example.com/news/ gives a 404 Not found error.

    Then a plugin adds a filter to modify any query for the non-existent news page, so that URLs like this find the appropriate posts:

    http://example.com/news/?region=usa&topic=politics

    Then the front-end menus can be generated or filtered to contain the appropriate URLs. The archive template will have to be modified, too, to display the terms from both taxonomies.

Reply

You must log in to post.

About this Topic