Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // This file is put in wp-content/themes/my_react_theme/react-src/public,
- // which when built, is put in wp-content/themes/my_react_theme/.
- $TEMPLATE_PATH = parse_url(get_template_directory_uri(), PHP_URL_PATH);
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="<?php bloginfo( 'charset' ); ?>">
- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta name="theme-color" content="#000000">
- <link rel="profile" href="http://gmpg.org/xfn/11">
- <!--
- manifest.json provides metadata used when your web app is added to the
- homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
- -->
- <link rel="manifest" href="<?php echo $TEMPLATE_PATH; ?>/manifest.json">
- <!--
- If you're reading this from "view source" in your browser, it might not make sense as
- these tokens have already been evaluated and replaced, even in this remark blurb.
- Notice the use of "php echo $TEMPLATE_PATH;" and %PUBLIC_URL% in the tags above.
- Both will be replaced with the URL of the `public` folder during the build (%PUBLIC_URL%) or
- at render time (php echo $TEMPLATE_PATH;)
- Only files inside the `public` folder can be referenced like this.
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
- work correctly both with client-side routing and a non-root public URL.
- Learn how to configure a non-root public URL by running `npm run wpbuild`.
- -->
- <?php wp_head(); ?>
- </head>
- <body>
- <noscript>
- You need to enable JavaScript to run this app.
- </noscript>
- <div id="root"></div>
- <!--
- This PHP file is a template.
- If you open it directly in the browser, you will see an empty page.
- You can add webfonts, meta tags, or analytics to this file.
- The build step will place the bundled scripts into the <body> tag.
- To begin the development, run `npm run wpstart` or `yarn wpstart`.
- To create a production bundle, use `npm run wpbuild` or `yarn wpbuild`.
- -->
- <?php wp_footer(); ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment