• Hello! I made a new register page for students for a class to register to the class-wordpress-blog.

    After the register with their data I automatically add a new Page to the blog – a user Profile Page with their Text and their Picture.

    I am using permalinks so the profile page is stored as
    https://www.myClass.com/blog/firstname-lastname/

    This all works perfectly just as i want it to, except one small detail.

    The permalinks will only be updated after I log-in as an Administrator and press the update permalink structure button..

    So the question is – how to I update the permalink structure right away after a student register over my self-build form page?

    thanks for helping out here!

Viewing 1 replies (of 1 total)
  • Thread Starter pixelcrash

    (@pixelcrash)

    I am glad to answer my question myself

    First thing you need to do is to include(“wp-config.php”);
    after that you can call the function $wp_rewrite->flush_rules(); which will update all the permalinks for me it works perfectly.

    have a good one

Viewing 1 replies (of 1 total)
  • The topic ‘permalinks update function();’ is closed to new replies.