且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在WordPress中隐藏特定页面上的标题

更新时间:2023-12-01 22:50:22

您说您已经为此特定页面创建了模板.

You say you have created a template for this specific page.

在这种情况下,您可以使用jQuery隐藏标题.将其添加到页面模板的末尾(或开始).

In which case you can use jQuery to hide the header. Add this to the end (or start) of your page template.

<script>jQuery('header').hide();</script>

您可能希望将其包装在类似 jQuery(document).ready(function(){之类的东西中,以确保在运行脚本之前加载页面.也许添加defer属性也是.

You would probably want to wrap this inside something like a jQuery( document ).ready(function() { to ensure the page is loaded before the script is run. Maybe add in the defer attribute too.