Php 我的css和自定义插件的js在我的默认页面上加载良好,但当我从搜索栏中搜索一些东西时,它不会加载我的插件js或css

Php 我的css和自定义插件的js在我的默认页面上加载良好,但当我从搜索栏中搜索一些东西时,它不会加载我的插件js或css,php,wordpress,Php,Wordpress,这是我的代码,默认情况下,我会将我的自定义插件(星级)绑定到每个帖子下显示,但当我从搜索框帖子中搜索此帖子(sultan)时,它会显示出来,但我的插件会变红,不会显示星星,只是显示而已 请评分:5颗星4颗星3颗星2颗星1颗星 而不是tje明星 虽然我检查了页面源代码,但我的css和js文件正在加载,但不知道它是否正常工作 在默认页面上使用星号的图像 带星形的图像不工作 功能wpa\u评级\u广告($content){ 全球$员额; $thePostID=$post->ID; $star=

这是我的代码,默认情况下,我会将我的自定义插件(星级)绑定到每个帖子下显示,但当我从搜索框帖子中搜索此帖子(sultan)时,它会显示出来,但我的插件会变红,不会显示星星,只是显示而已

请评分:5颗星4颗星3颗星2颗星1颗星

而不是tje明星

虽然我检查了页面源代码,但我的css和js文件正在加载,但不知道它是否正常工作

在默认页面上使用星号的图像

带星形的图像不工作

功能wpa\u评级\u广告($content){
全球$员额;
$thePostID=$post->ID;
$star=

请注明:
五星
四星
三星
双星
一颗星

' ; 返回$content.$star; } 添加过滤器(“内容”、“wpa评分”广告);
您可以查看wordpress文档,url

谢谢您的建议
function wpa_rating_ad($content) {
global $post;
$thePostID = $post->ID; 
    $star='
    <p>
        <div class="rating">
            <legend>Please rate:</legend>
            <input type="radio" id="star5-'.$thePostID.'"  name="rating" value="5" data-id="'.$thePostID.'" class="rating-star" />
                <label  for="star5-'.$thePostID.'" title="Rocks!">5 stars</label>
            <input type="radio" id="star4-'.$thePostID.'" name="rating" value="4" data-id="'.$thePostID.'" class="rating-star" />
                <label  for="star4-'.$thePostID.'" title="Pretty good">4 stars</label>
            <input type="radio" id="star3-'.$thePostID.'" name="rating" value="3" data-id="'.$thePostID.'" class="rating-star" />
                <label  for="star3-'.$thePostID.'" title="Meh">3 stars</label>
            <input type="radio" id="star2-'.$thePostID.'" name="rating" value="2" data-id="'.$thePostID.'" class="rating-star" />
                <label for="star2-'.$thePostID.'" title="Kinda bad">2 stars</label>
            <input type="radio" id="star1-'.$thePostID.'" name="rating" value="1" data-id="'.$thePostID.'"  class="rating-star" />
                <label for="star1-'.$thePostID.'" title="Sucks big time">1 star</label>
        </div>
    </p> 
    <p>
        <div id="services-name-'.$thePostID.'" class="services-btn">
        </div>
    </p>'
    ;

     return $content.$star;
}
add_filter('the_content', 'wpa_rating_ad');