Editing class-football-pool.php to create extra "prediction" pages
-
Hi there,
For the tournament I am creating I want to separate the “prediction” page into several pages and only display events for a particular month etc.
I can edit (class-football-pool-pool-page.php) to display the data how I want but I can’t figure how to create duplicates of the “prediction” page upon activation.
private static $pages = array( array( 'slug' => 'tournament', 'title' => 'matches', 'comment' => 'closed' ), array( 'slug' => 'teams', 'title' => 'teams', 'parent' => 'tournament', 'comment' => 'closed' ), array( 'slug' => 'groups', 'title' => 'groups', 'parent' => 'tournament', 'comment' => 'closed' ), array( 'slug' => 'stadiums', 'title' => 'venues', 'parent' => 'tournament', 'comment' => 'closed' ), 'rules' => array( 'slug' => 'rules', 'title' => 'rules', 'text' => '' ), array( 'slug' => 'pool', 'title' => 'march', 'comment' => 'closed' ), array( 'slug' => 'pool', 'title' => 'april', 'comment' => 'closed' ), array( 'slug' => 'pool', 'title' => 'may', 'comment' => 'closed' ), array( 'slug' => 'ranking', 'title' => 'ranking', 'comment' => 'closed' ), array( 'slug' => 'statistics', 'title' => 'charts', 'comment' => 'closed' ), array( 'slug' => 'user', 'title' => 'predictions', 'comment' => 'closed' ) );
I thought it would be as simple as adding the extra lines to the pages array as I have done above, but I was wrong. This does change the page title of the “prediction” page to “march” but does not create the “april” or “may” pages.
Could you please lead me in the right direction?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Editing class-football-pool.php to create extra "prediction" pages’ is closed to new replies.