主题安装的默认页面

发布于 2024-12-25 08:32:07 字数 425 浏览 4 评论 0原文

我正在构建一个主题作为我所有 wp 安装的默认模板,我已经成功创建了一个主题选项页面,并且我可以将它们集成为一个页面主题,但要实现此目的,需要我创建一个新的页面,例如“隐私政策”,将页面主题设置为我的服装页面主题,调用主题选项,发布页面,在管理区域修改主题选项。这可行,但这不是我想要的,

我想要的是一个类似的管道,->安装主题->配置主题选项->完成

我想跳过创建新页面并向其应用页面主题的过程,我想执行此“硬编码”,例如页脚中指向 /privacypolicy.php 的链接,问题是它不起作用这样,我猜测这将与 .htaccess 相关,例如将永久重定向添加到完整模板目录 / targetpage.php / 并将其重定向到“blogurl/privacypolicy”之类的内容,是问题吗?我知道关于配置 .htaccess 重定向或其他什么我应该做什么吗

I'm building a theme to be my deafult template to all my wp installs, I've managed to sucessfully create a theme options page and I can integrate them a page theme, but for this to work it is required that I create a new page, for instance, "Privacy Policy", set the page theme to my costum page theme that calls theme options, publish the page, modify the theme options in admin area. This works, but this is nto what I'm lookig for,

What I want is a pipeline that goes like, ->install theme->configure theme options-> done

I want to skip the process of creatign a new page and applying the page theme to it, I would like do this "hardcoded", like, a link in the footer to /privacypolicy.php", problem is that it does not work this way, I'm guessing this would be something related to .htaccess, like adding the permanent redirect to the full themplate directory / targetpage.php / and redirect it to something like "blogurl/privacypolicy", is it? the probleme is I know squat about configuring a .htaccess redirect or whateverm what should I do?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断念 2025-01-01 08:32:07

只是一个想法...如果您使用您开发的主题设置一个干净的 WordPress 安装会怎样。添加一个页面并放入您想要的内容(隐私策略),然后从 WordPress 存储的表中提取页面条目并将其转换为 sql 语句,然后在激活主题时执行该语句。确保该页面尚不存在。希望这有帮助。

Just an idea...what if you setup a clean WordPress install using the theme you developed. Add a page and put in the content that you want (Private Policy) and then extract the page entry from the table that WordPress stores it in and convert it into a sql statement which you then execute when your theme is activated. Make sure though that the page does not exist yet. Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文