Closed flegfleg closed 9 years ago
the code that you for generate the page is the same of the boilerplate?
yes, same.
/*
* Load Fake Page class
*/
require_once( plugin_dir_path( __FILE__ ) . 'includes/fake-page.php' );
new Fake_Page(
array(
'slug' => 'faker_tester',
'post_title' => 'Fake Page Title',
'post content' => 'This is the fake page content'
)
After the edit of the slug you have refresh the permalink? Go on settings->permalink and click on the save button, in this way wordpress load the new permalink. If you change the slug after the flush wordpress don't reconize the slug, while the boilerplate on activation flush the permalink :-)
I've updated the class that have some problems
When browsing to the page created with the fake page class, i get the following error:
Undefined property: stdClass::$post_type in /wp-includes/query.php
Notice: Undefined offset: -1604600763 in /wp-includes/query.php on line 3708
am i using it wrong?