如何修复 500 服务器错误?以及如何登录到 WordPress 仪表板?

How to fix 500 server error? and how to login to WordPress dashboard?

我已经通过以下步骤在 WordPress 中粘贴了 google 添加感知代码:

步骤 1

登录到我的仪表板,然后转到外观选项卡和 select 编辑器选项

步骤 2

之后我进入主题功能,window 打开有代码。

步骤 3

我转到最后一个 window 然后按回车键并通过 google adsense adunit 放置添加代码。

代码是:

Function myAddSenseFunction(){
return '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- header ad -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6517659835455449"
     data-ad-slot="7383706018"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>';
}
add_shortcode('addToAppearHere','myAddSenseFunction')

之后我更新文件

然后我的 word press 管理面板没有打开。出现 500 服务器错误消息。 请建议我如何解决此错误?并再次登录我的仪表板 ??

我认为您的问题是您想在您的 wordpress 博客中添加 google adsense 广告单元。当您想 在您的 post 中投放广告时。

For that purpose you logged in into your wp-admin dashboard and your changed your theme by adding a function into function.php file within the theme-functions option. You must have to put your function (containing ad unit code) at the end of the file and updated it. Then you can use your function name in your post like [functionName] and that's how you place ad in your wordpress post.

但是你搞砸了你的网站,getting 500 server error你在 wordpress 文件中添加的平均功能有一个编程错误.

That's why you can't even access your wp-admin dashboard, do you also have problem accessing that post in which you added your ad?

现在您需要一个解决方案以某种方式检查该文件function.php解决该错误。并且您希望您的站点不出现 500 服务器错误。