如何将自定义 HTML 代码放在 wordpress 网站的标题中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17136498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 10:09:42  来源:igfitidea点击:

How to put custom HTML code in header of wordpress websites

htmlwordpresswordpress-theming

提问by user2491342

This is my website and I need to put html code in order to make the header option form functional http://emmacombes.com/

这是我的网站,我需要放置 html 代码才能使标题选项表单正常工作http://emmacombes.com/

But I have no clue where I can paste the HTML Code for header. Wordpress theme used - suffusion

但我不知道在哪里可以粘贴标题的 HTML 代码。使用的 Wordpress 主题 - suffusion

Thanks

谢谢

回答by koala_dev

You should find a file named header.phpinside your theme's folder located in /wp-content/themes/{your-theme}that's the template file where you can add your code.

您应该header.php在位于/wp-content/themes/{your-theme}模板文件中的主题文件夹中找到一个名为的文件,您可以在其中添加代码。

回答by Corlax

hello you can do it easily by going to wp-content/themes/your-theme/header.php

您好,您可以通过转到 wp-content/themes/your-theme/header.php 轻松完成

and paste code above the

并在上面粘贴代码

or by login into wordpress

或登录wordpress

after login into wordpress go Appreance>>editor in right side you find "Templates" below that you find list files search header.php there

登录 wordpress 后,在右侧的 Appreance>>editor 中找到“模板”,然后在那里找到列表文件搜索 header.php

and go to there and paste code above

然后去那里粘贴上面的代码