• Hello,

    This is the flow.

    Registration page —> (code to execute) —> Getting started page.

    My membership plugin can take care of most of this however the code to execute is where I would to further clarification.

    Basically once a user registers. I need a few things to happen.
    The theme will be set for the whole network and they will not be able to change the theme.
    0.) Decided theme set.
    1.) Home page automatically created.
    2.) Blog Post Page Automatically creates.
    3.) Settings to set home page as static home page.
    4.) Settings to set blog page as posts page.
    5.) set permalink structure to post name.

    How can I achieve this and what is the best way.

    I am familiar with PHP not overly with php for WordPress. explanations or links to more info would be very helpful.

    Thanks

    Regards
    Chris

    • This topic was modified 5 years, 2 months ago by weblify.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You might already know that nearly all WP customization with PHP is managed through filter and action hooks. We never directly alter core files. You might want to review the section on hooks in the Plugin Handbook if you are not familiar with them. A clear understanding of how hooks work is very important when customizing WP.
    https://developer.www.ads-software.com/plugins/hooks/

    For new site creation, you can use the ‘wp_initialize_site’ action. Your callback is sent the new WP_Site object and the args used to create it. From there you can insert page data or set options as desired.
    https://developer.www.ads-software.com/reference/hooks/wp_initialize_site/
    For hook docs pages like the above link, I like to follow the “Used By” link to see the function’s source code that implements the hook so I can see how it is used in context.

Viewing 1 replies (of 1 total)
  • The topic ‘Automatic Page creation on site creation’ is closed to new replies.