高级 WordPress php 帮助
我试图包含这个滑出信息面板 我在我的 WordPress 网站中创建了它。我尝试在 page.php 文件和 index.php 文件中使用,但没有成功。我的网站是一个单页网站,我相信我在解决这个问题时遇到了问题。包含文件实际上是一个完整的 html 页面,所以我对如何处理这个问题感到困惑。请帮助......建议
I am trying to include this sliding out info panel
that i created into my wordpress site. I have tried using in the page.php file and the index.php file and have had no success. My site is a single page site and i believe i am having issues figuring this out because of that. The include file is actually a whole html page so im getting stumped on how to go about this. Please Help......Sugestions
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要整个 html 页面。您只需要这部分(按钮和 div)。将它放在 page.php 的 body 标记中的某个位置,因为它位于 css 中,所以位置并不重要:
然后确保 header.php 的 head 标记中有这个 javacript:
然后显然还需要 jquery js header.php 中的 head 标签:
header.php 中 head 标签中触发器和框的 css:
You don't need the whole html page. You just need this part (the button and the div). Put it in the page.php somewhere in the body tag, doesn't really matter where since it's positioned in the css:
Then make sure you have this javacript in the head tag in header.php:
Then also obviously need the jquery js in the head tag in header.php:
And the css for the trigger and box in the head tag in header.php: