Forums

Is there a way to dynamically generate pages? (4 posts)

  1. seonghuhn
    Member
    Posted 2 years ago #

    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

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    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.

  3. seonghuhn
    Member
    Posted 2 years ago #

    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.

  4. Samuel B
    moderator
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic