100% PERFECT MRBRIAN SIR!!!
THANKS IN A MILLION!!! more than words from me.. really appreciate your help.. thank u..
100% PERFECT MRBRIAN SIR!!!
THANKS IN A MILLION!!! more than words from me.. really appreciate your help.. thank u..
I can't seem to figure out how to set a particular template page to the page that gets auto-created on signup.. The name of the template file name is "page-gallery.php", the template name is "gallery"
Here's the code for creating the new gallery page on registration.
$wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ('$user_id', '$now', '$now_gmt', '".$wpdb->escape(__('[gallery=1]'))."', '', '".$wpdb->escape(__('gallery.'))."', '0', '".$wpdb->escape(__('gallery'))."', '$now', '$now_gmt', 'publish', 'page', '', '', '')");
Please help! Thanks a bunch!
Brian
I posted the code for that just a few replys up.
How do i go about getting what the post_id is for the new page that's gets created?
I'm assuming i add that query directly below the code for creating the default page in wpmu_functions.php file.
Also, in the example you provided, does the template name go in the '_wp_page_template' section as shown below?
$wpdb->query("insert into $wpdb->postmeta (post_id,meta_key,meta_value) values ('15','_wp_page_template','templatefile.php')");
Thank you very much Brian for your help!
- Brian
bump
wpdb->insert_id.
where would i incorporate that into the wpmu-functions.php file.. heres my current code, with the addition of Mr. Brian's code?
// Second auto create page
$wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ('$user_id', '$now', '$now_gmt', '".$wpdb->escape(__('page content example'))."', '', '".$wpdb->escape(__('work'))."', '0', '".$wpdb->escape(__('work'))."', '$now', '$now_gmt', 'publish', 'page', '', '', '')");
// Assign template to second page
/$wpdb->query("insert into $wpdb->postmeta (post_id,meta_key,meta_value) values ('15','work','page_work.php')");
Thank you so much!
Brian
Fantastic! Figured it out! :)
Thank you very much!
Brian
somebody has got to make tutorial of this, cause it's great! dedicated to Mr.Brian sir, Lunabyte, Andrea, drmiketemp
Calling for wpmu tutorials!!! :)
I've been unable to make this work, has there been some version upgrade that overwrote the wpmu-functions.php file? I'm using 2.70
I wish the search worked better and was pointed to the right search page from the main page.
benlagrone - there are now plugins available to handle this, as well as optins for default content under Site Admin -> Options menu.
Thanks Andrea!
I updated to 2.7.1 and found options to specify the default post, etc.
I don't see it in the upgrade, is there any way to set default pages on a new user set up?
Thanks again.
« Previous 1 2