标题计数器功能不适用于WordPress,错误500

标题计数器功能不适用于WordPress,错误500,wordpress,function,Wordpress,Function,在此之前,我在我的WordPress函数中使用此代码从未遇到任何问题,但到本月为止,由于此代码,我出现了错误。有人能检测到此问题吗? 您可以尝试将其放在WordPress function.php上。它过去是计数器 <?php function my_title_count(){ ?> <script>jQuery(document).ready(function(){ jQuery("#titlediv .inside").after("<div style=\

在此之前,我在我的WordPress函数中使用此代码从未遇到任何问题,但到本月为止,由于此代码,我出现了错误。有人能检测到此问题吗? 您可以尝试将其放在WordPress function.php上。它过去是计数器

<?php

function my_title_count(){ ?>
<script>jQuery(document).ready(function(){
jQuery("#titlediv .inside").after("<div style=\"position:absolute;top:40px;right:-5px;\"><span>Max 57 characters:</span> <input type=\"text\" value=\"0\" maxlength=\"3\" size=\"3\" id=\"title_counter\" readonly=\"\" style=\"background:none;border:none;box-shadow:none;font-weight:bold; text-align:right;\"></div>");
jQuery("#title_counter").val(jQuery("#title").val().length);
jQuery("#title").keyup( function() {
jQuery("#title_counter").val(jQuery("#title").val().length);
});
});
</script>
<? }
add_action( 'admin_head-post.php', 'my_title_count');
add_action( 'admin_head-post-new.php', 'my_title_count');
?>

<?php function my_excerpt_count(){ ?>
<script>jQuery(document).ready(function(){
jQuery("#postexcerpt .handlediv").after("<div style=\"position:absolute;top:4px;right:25px;\"><span>Max 156 characters:</span> <input type=\"text\" value=\"0\" maxlength=\"3\" size=\"3\" id=\"excerpt_counter\" readonly=\"\" style=\"background:none;border:none;box-shadow:none;font-weight:bold; text-align:right;\"></div>");
jQuery("#excerpt_counter").val(jQuery("#excerpt").val().length);
jQuery("#excerpt").keyup( function() {
jQuery("#excerpt_counter").val(jQuery("#excerpt").val().length);
});
});
</script>
<? }
add_action( 'admin_head-post.php', 'my_excerpt_count');
add_action( 'admin_head-post-new.php', 'my_excerpt_count');
?>

jQuery(文档).ready(函数(){
jQuery(“#titlediv.inside”)。之后(“最多57个字符:”);
jQuery(“#title_counter”).val(jQuery(“#title”).val().length);
jQuery(“#title”).keyup(函数(){
jQuery(“#title_counter”).val(jQuery(“#title”).val().length);
});
});
jQuery(文档).ready(函数(){
jQuery(#postseceport.handlediv”)。之后(“最多156个字符:”;
jQuery(“#摘录#计数器”).val(jQuery(“#摘录”).val().length);
jQuery(“#摘录”).keyup(函数(){
jQuery(“#摘录#计数器”).val(jQuery(“#摘录”).val().length);
});
});

来源:

你能检查你服务器的错误日志并告诉我错误吗?等等,我必须想办法在google Cloud中获取错误日志对不起,我无法从我的Php错误日志中获取任何错误日志删除两个函数之间的Php结束和开始标记,然后重试。完成,没有错误,不会再次获取500,但这不适用于获取标题计数器