0

I've been researching how to do this for some time now, and I'm coming up short.

I have my main blog, example.com, which we've created a custom post type of Property. I'm needing the exact layout and format of a single-property (example.com/blog/property/1exampleproperty) to be the homepage, when we create other sites through multisite. Is this possible?

Thank you

2
  • Will all the sites be using a common theme?
    – C C
    Commented Jun 29, 2016 at 17:20
  • Yes all sites using the same theme. Preferably at least.
    – Jay
    Commented Jun 29, 2016 at 18:13

1 Answer 1

0

You have two options; either bake into the theme (functions.php) or write a simple plugin that auto-creates the post based on hooking into after new site (blog) creation:

https://codex.wordpress.org/Plugin_API/Action_Reference/wpmu_new_blog

Use the insert post function to do the creation:

https://developer.wordpress.org/reference/functions/wp_insert_post/

Then, set as the home page based on ID returned:

update_option( 'page_on_front', $new_page->ID );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.