WordPress.org

Ready to get started?Download WordPress

Forums

Dynamically generated taxonomy of site pages (3 posts)

  1. the_lar
    Member
    Posted 2 years ago #

    Hi all,

    Quick question, would really help me out if anyone knows how this can be done – I haven’t found anything on Google!

    I am building a site and have created various pages, home, about, contact etc. I now want to set up a custom post type for promotions and have a taxonomy which allows me to select which page(s) I want the promotion to appear on. No problem doing this with a custom taxonomy that I create and populate myself called ‘site areas’ however I want the ‘site areas’ taxonomy to be dynamic – e.g. if I add a ‘services’ content page, it automatically is available for me to select on my promotion.

    I thought this would be pretty simple, but as I say, I've been unable to find any useful advice so far.

    Thanks
    Kevin

  2. the_lar
    Member
    Posted 2 years ago #

    Anybody got any thoughts on the above?

  3. tenten71
    Member
    Posted 2 years ago #

    Not sure I understand what you want to do.

    Do you want the promotion (custom post-type) to appear on a regular Page like About, for example?

    You can create a template page called single-promotions.php that would dynamically create a post for each promotion OR an archive-promotions.php template to show all your promotions.

    To have a custom post show up in a static Page, you'd have to create a template for it and create a specific get_posts function to call what you need.

    Am I close?

    Hate finding forum questions unanswered!

Topic Closed

This topic has been closed to new replies.

About this Topic