Plugin-development; inserting a static page
-
Hi.
I am trying to build a plugin.I am trying to insert a static page programmatically when the plugin is installed.
Here is the code:function dbes_create_events_page()
{
global $wpdb;
$sql= “INSERT INTO wp_posts (post-author,post_title)
VALUES (‘admin’,’Eventi’)”;
$wpdb->query($sql);
}As you see I just inserted two fields, for a test…
This does not work, I just get error messages…
WHat is the right way to implement this?
Cheers,
Davide
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Plugin-development; inserting a static page’ is closed to new replies.