WordPress.org

Support

Support » Plugins and Hacks » Hacks » auto generate pages

auto generate pages

  • Hello. I am developing a sport website that will have a “scores” section. There will be plenty competitions involved and I will need a separate page for each day of a specific competition. To fully understand, lets say I will have a Premier League page and a Serie A page, each one having 38 subpages corresponding to the 38 days. The permalink of these pages will be something like example.com/premierleague/day1, example.com/premierleague/day2, … example.com/premierleague/day38, examplecom/seriea/day1, example.com/seriea/day2 and so on.

    Obviously, I will use a template to display the scores on each one of these pages. Now the question is: is there a way of creating all these pages (there will be hundreds of them) other that manually creating them in the Page section in admin?

Viewing 1 replies (of 1 total)
  • you can create a plugin with an admin panel – there you can offer different options and input fields and with a button you can create the pages – wp_insert_post() creates pages, post_type=’page’.

    if you assign different categories (premierleague, seriea etc.) to the pages with the wp_insert_call you can create for each category a template file.

Viewing 1 replies (of 1 total)
  • The topic ‘auto generate pages’ is closed to new replies.