Support » Plugins » Is there a way to dynamically generate pages?

  • Hi,

    I wanted to create a sports blog and dynamically generate pages for each player with stats and other data from the database. Is there a way to do this?

    A similar question is how can you dynamically generate posts? I would like to do that but leave them as drafts so I can add a human touch to them before publishing them.

    Thanks,
    Frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • 1. Easiest way is to put the database tables in the same database as the WordPress tables then use the wpdb class to access the data

    2. WordPress does have a draft status for posts, but not sure what you mean by “dynamically generate posts”. You can use query_posts to display only drafts using the post_status=draft argument.

    Michael,

    Thanks so much for replying.

    I am trying to create a sports website. I wanted to dynamically generate posts that would use data from games in the last 24 hours. I wanted to leave these posts in draft mode so I can then edit them w/ some human commentary.

    I also wanted to dynamically create pages for each player and that would be about 500 pages.

    I see wpdb can help but it seems like you need to know the structure of the DB to dynamically generate these pages and posts.

    Also is there a way to put pages that provide tools, e.g. how is a player doing?, within a wordpress site? These pages can be PHP or another language.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there a way to dynamically generate pages?’ is closed to new replies.