|
| 1 | +<?php |
| 2 | + $TEMPLATE_PATH = parse_url(get_template_directory_uri(), PHP_URL_PATH); |
| 3 | +?> |
| 4 | +<!DOCTYPE html> |
| 5 | +<html lang="en"> |
| 6 | +<head> |
| 7 | +<meta charset="utf-8" /> |
| 8 | + <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> |
| 9 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 | + <meta name="theme-color" content="#000000" /> |
| 11 | + <meta |
| 12 | + name="description" |
| 13 | + content="Web site created using create-react-wptheme" |
| 14 | + /> |
| 15 | + <link rel="apple-touch-icon" href="<?php echo $TEMPLATE_PATH; ?>/logo192.png" /> |
| 16 | + <!-- |
| 17 | + manifest.json provides metadata used when your web app is installed on a |
| 18 | + user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ |
| 19 | + --> |
| 20 | + <link rel="manifest" href="<?php echo $TEMPLATE_PATH; ?>/manifest.json" /> |
| 21 | + <!-- |
| 22 | + If you're reading this from "view source" in your browser, it might not make sense as |
| 23 | + these tokens have already been evaluated and replaced, even in this remark blurb. |
| 24 | + |
| 25 | + Notice the use of "php echo $TEMPLATE_PATH;" and %PUBLIC_URL% in the tags above. |
| 26 | + Both will be replaced with the URL of the `public` folder during the build (%PUBLIC_URL%) or |
| 27 | + at render time (php echo $TEMPLATE_PATH;) |
| 28 | + Only files inside the `public` folder can be referenced like this. |
| 29 | + |
| 30 | + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will |
| 31 | + work correctly both with client-side routing and a non-root public URL. |
| 32 | + Learn how to configure a non-root public URL by running `npm run wpbuild`. |
| 33 | + --> |
| 34 | + <title>React WordPress Theme</title> |
| 35 | +</head> |
| 36 | + <body> |
| 37 | + <noscript> |
| 38 | + You need to enable JavaScript to run this app. |
| 39 | + </noscript> |
| 40 | + <div id="root"></div> |
| 41 | + <!-- |
| 42 | + This PHP file is a template. |
| 43 | + If you open it directly in the browser, you will see an empty page. |
| 44 | + |
| 45 | + You can add webfonts, meta tags, or analytics to this file. |
| 46 | + The build step will place the bundled scripts into the <body> tag. |
| 47 | + |
| 48 | + To begin the development, run `npm run wpstart` or `yarn wpstart`. |
| 49 | + To create a production bundle, use `npm run wpbuild` or `yarn wpbuild`. |
| 50 | + --> |
| 51 | + </body> |
| 52 | +</html> |
0 commit comments