从未安装的目录访问 WordPress
我的网站根目录有一个目录 /examples/
。我想保留这个层次结构:
/examples/foo1/
/examples/foo2/ ...etc
我还在根目录安装了 WordPress,我的帖子显示在主页上。我发现我无法访问 /examples/
目录或示例目录中的任何文件夹中的任何 WordPress 功能或任何与 WordPress 相关的内容。
我知道我可以在 WordPress 中创建一个名为 Examples 的页面,并在 Examples 下创建子页面以获得所需的目录,但我不想最终得到 300 个示例内容的子页面。这就像将页面部分视为帖子部分一样。
有没有办法可以从我创建的 /examples/
目录访问 WordPress 变量和函数?或者是否有另一种我没有想到的方法来获取此目录并且仍然可以访问 WordPress 的内容?
我希望这是清楚的..谢谢!
I have a directory /examples/
that is at the root of my site. I want to retain this hierarchy:
/examples/foo1/
/examples/foo2/ ...etc
I also have wordpress installed at the root with my posts shown on the home page. I found out the long way that I cant access any wordpress functions or anything wordpress related from within the /examples/
directory or any folders within examples directory.
I know I can make a page within wordpress called examples and make sub pages under examples to get the desired directory, but I dont want to end up with 300 subpages of example content. Thats like treating the page section as a post section.
Is there a way I can access wordpress variables and functions from the /examples/
directory that I made? Or is there another method that I have not thought of to get this directory and still have access to wordpress stuff?
I hope this is clear.. thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这与之前回答的问题类似。请参阅在相同域中显示 WP 内容的说明:
This is similar to a question previously answered. Refer to the instructions for displaying WP content in the same domain: