Home>

I want to use the inquiry form of MW WP Form outside the WordPress system.
I tried it with the following code, but the short code is displayed as it is.

/form/index.html

<? php require_once ('../wp/wp-blog-header.php');?>
<! DOCTYPE html>
<html lang = "en">
<head>
  <meta charset = "UTF-8">
  <title>MW WP Form</title>
</head>
<body>
<? php
  echo do_shortcode ('[mwform_formkey key = "60"]');
?>
</body>
</html>

Because it is used outside the WP system,

<? php require_once ('../wp/wp-blog-header.php');?>


Is added.

Do_shortcode tries to display the inquiry form.
As for the folder structure, the WordPress body is installed at the root/wp /.
When the short code was written on the fixed page as a trial, the form body was displayed without problems.

Is MW WP Form not available outside the WordPress system in the first place?

Would you please teach me?

  • Answer # 1

      

    The short code of MW WP Form is activated by looking at $post->post_content (the article text entered in the management screen). Therefore, it is not activated when it is described directly in the template.

    https://StackOverflow.com/questions/47319

  • Answer # 2

    If it is a WordPress plug-in, it is built on the assumption that it will run inside WordPress, so I think it can not be used outside It ’s fine.

    In other words, if you want to use it as it is, you will be "making your own equivalent to WordPress".
    I think that it is better to make only the plug-in by looking at the operation of the plug-in alone.

    Depending on the requirements, it may be realistic to use only that form with WordPress installed. It depends on the requirements, so it would cost a lot of money depending on the requirements. (Especially if you want to coordinate data, sessions, etc.)