admin管理员组文章数量:1026989
when I try to search something it shows me that I have an error in line 9
The code on line 9 on my page "search.php" of my theme
<div class="p-title"><h2 style="background-color: #1AB3EE;">Searching for <?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong class="terms_search">'); echo $key; _e('</strong>'); _e(' - About '); echo $count . ' '; _e('results'); wp_reset_query(); ?></h2></div>
The error message
when I try to search something it shows me that I have an error in line 9
The code on line 9 on my page "search.php" of my theme
<div class="p-title"><h2 style="background-color: #1AB3EE;">Searching for <?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong class="terms_search">'); echo $key; _e('</strong>'); _e(' - About '); echo $count . ' '; _e('results'); wp_reset_query(); ?></h2></div>
Share Improve this question asked Mar 23, 2019 at 13:17 Ol MimudOl Mimud 31 bronze badgeThe error message
1 Answer
Reset to default 3Using &new
in object creation is deprecated in PHP 7+ because objects are passed by be reference by default. Remove the &
when I try to search something it shows me that I have an error in line 9
The code on line 9 on my page "search.php" of my theme
<div class="p-title"><h2 style="background-color: #1AB3EE;">Searching for <?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong class="terms_search">'); echo $key; _e('</strong>'); _e(' - About '); echo $count . ' '; _e('results'); wp_reset_query(); ?></h2></div>
The error message
when I try to search something it shows me that I have an error in line 9
The code on line 9 on my page "search.php" of my theme
<div class="p-title"><h2 style="background-color: #1AB3EE;">Searching for <?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<strong class="terms_search">'); echo $key; _e('</strong>'); _e(' - About '); echo $count . ' '; _e('results'); wp_reset_query(); ?></h2></div>
Share Improve this question asked Mar 23, 2019 at 13:17 Ol MimudOl Mimud 31 bronze badgeThe error message
1 Answer
Reset to default 3Using &new
in object creation is deprecated in PHP 7+ because objects are passed by be reference by default. Remove the &
本文标签: problem with my my theme quotsearchphpquot
版权声明:本文标题:problem with my my theme "search.php" 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745664008a2162066.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论