CSS文件在php模板中的位置

CSS文件在php模板中的位置,php,wordpress,Php,Wordpress,我正在为一家朋友公司做一些编辑工作,wordpress模板是用一种非常古老的方式编写的。我已经了解了大部分代码的工作原理,但有一件事让我感到困惑,那就是文件引用了css信息,它没有以任何常规方式导入它,也没有使用主要的wordpress主题css文件。我也找不到firebug中的资源。有人能帮我理解这个代码是如何工作的吗?我特别想访问singleStyle div的css信息 网址: 代码: post_class(); */ ?> var pageNum=1; var-catIndex=0;

我正在为一家朋友公司做一些编辑工作,wordpress模板是用一种非常古老的方式编写的。我已经了解了大部分代码的工作原理,但有一件事让我感到困惑,那就是文件引用了css信息,它没有以任何常规方式导入它,也没有使用主要的wordpress主题css文件。我也找不到firebug中的资源。有人能帮我理解这个代码是如何工作的吗?我特别想访问singleStyle div的css信息

网址:

代码:


post_class();
*/
?>
var pageNum=1;
var-catIndex=0;
var pageMax,catSlugList=[“夹套”];
var originalCat=catSlugList[catIndex];
var originalCastid=9;
$(函数(){
$.ajax({
url:'/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories、type、url、title_plain、status、extract、comments、comment_count、comment_status、tags、attachments、modified、date、author'、,
成功:功能(数据){
pageMax=data.pages;
var$collectionDiv=$(“#styleCollectionDiv”)。子项(“div:eq(1)”;
var$showLargerDiv=$(“#viewLargerDiv”);
for(data.posts中的var i){
$collectionDiv.append(“+data.posts[i].content+”“+data.posts[i].title+”

”); } $showLargerDiv.append($collectionDiv.children(“div:eq(0)”).clone()); $(“#stylesDiv.singleStyle”).mouseenter(函数(e){ $(“#viewLargerDiv”).empty().append($(this.clone()); }); $(“.childrenUls a”).removeClass(“活动”); $(“.childrenUls a:eq(“+catIndex+”).addClass(“活动”); } }); $(“.childrenUls a”)。单击(函数(e){ 返回false; }); $(“#集合导航p a”)。单击(功能(e){ if(this.getAttribute(“href”)=“返回”){ 如果(pageNum==1){ 返回false; }否则{ pageNum--; $.ajax({ url:'/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories、type、url、title_plain、status、extract、comments、comment_count、comment_status、tags、attachments、modified、date、author'、, 成功:功能(数据){ $(“#stylesDiv,#viewLargerDiv”).empty(); pageMax=data.pages; var$collectionDiv=$(“#styleCollectionDiv”)。子项(“div:eq(1)”; var$showLargerDiv=$(“#viewLargerDiv”); for(data.posts中的var i){ $collectionDiv.append(“+data.posts[i].content+”“+data.posts[i].title+”

”); } $showLargerDiv.append($collectionDiv.children(“div:eq(0)”).clone()); $(“#stylesDiv.singleStyle”).mouseenter(函数(e){ $(“#viewLargerDiv”).empty().append($(this.clone()); }); $(“.childrenUls a”).removeClass(“活动”); $(“.childrenUls a:eq(“+catIndex+”).addClass(“活动”); } }); } }else if(this.getAttribute(“href”)=“更多”){ 如果(pageNum”); } $showLargerDiv.append($collectionDiv.children(“div:eq(0)”).clone()); $(“#stylesDiv.singleStyle”).mouseenter(函数(e){ $(“#viewLargerDiv”).empty().append($(this.clone()); }); $(“.childrenUls a”).removeClass(“活动”); $(“.childrenUls a:eq(“+catIndex+”).addClass(“活动”); } }); }否则{ 返回错误 } } 返回false;
<?php
/**
 * The template used for displaying page content in page.php
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
<?php the_ID(); ?> 
post_class();

 */
?>
    <h1 class="entry-title"><?php the_title(); ?></h1>

    <div class="entry-content">
        <?php if(is_page( array( 319, 321 ) ) ) { ?>


            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

            <?php if(is_page( 319 ) ) { // Mens ?>

                <script>
                var pageNum = 1;
                var catIndex = 0;
                var pageMax, catSlugList = ["jackets"];
                var originalCat = catSlugList[catIndex];
                var originalCatID = 9;


                $(function() {
                    $.ajax({
                        url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                        success: function(data) {
                            pageMax = data.pages;
                            var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                            var $showLargerDiv = $("#viewLargerDiv");
                            for(var i in data.posts){
                                $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                            }
                            $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                            $("#stylesDiv .singleStyle").mouseenter( function(e){
                                $("#viewLargerDiv").empty().append($(this).clone());
                            });


                            $(".childrenUls a").removeClass("active");
                            $(".childrenUls a:eq("+catIndex+")").addClass("active");
                        }
                    });


                    $(".childrenUls a").click( function(e){
                        return false;
                    });

                    $("#collectionNav p a").click( function(e){
                        if(this.getAttribute("href") === "#Back"){
                            if(pageNum === 1){

                                return false;
                            } else {
                                pageNum--;

                                $.ajax({
                                    url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                    success: function(data) {
                                        $("#stylesDiv, #viewLargerDiv").empty();
                                        pageMax = data.pages;
                                        var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                        var $showLargerDiv = $("#viewLargerDiv");
                                        for(var i in data.posts){
                                            $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                        }
                                        $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                        $("#stylesDiv .singleStyle").mouseenter( function(e){
                                            $("#viewLargerDiv").empty().append($(this).clone());
                                        });

                                        $(".childrenUls a").removeClass("active");
                                        $(".childrenUls a:eq("+catIndex+")").addClass("active");
                                    }
                                });

                            }
                        } else if(this.getAttribute("href") === "#More"){
                            if(pageNum < pageMax){
                                pageNum++;
                                $.ajax({
                                    url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                    success: function(data) {
                                        $("#stylesDiv, #viewLargerDiv").empty();
                                        pageMax = data.pages;
                                        var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                        var $showLargerDiv = $("#viewLargerDiv");
                                        for(var i in data.posts){
                                            $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                        }
                                        $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                        $("#stylesDiv .singleStyle").mouseenter( function(e){
                                            $("#viewLargerDiv").empty().append($(this).clone());
                                        });

                                        $(".childrenUls a").removeClass("active");
                                        $(".childrenUls a:eq("+catIndex+")").addClass("active");
                                    }
                                });
                            } else {
                                return false
                            }
                        }
                        return false;
                    });
                });
                </script>

                <ul class="childrenUls cMe">
                    <?php wp_list_categories('child_of=5&orderby=id&order=DESC&title_li='); ?>
                </ul>

            <?php } else if(is_page( 321 ) ) { // Womens ?>

                <script>
                var pageNum = 1;
                var catIndex = 0;
                var pageMax, catSlugList = ["jackets-vests-assessories","hip-34-length","full-length"];
                var originalCat = catSlugList[catIndex];
                var originalCatID = 8;
                $(function() {
                    $.ajax({
                        url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                        success: function(data) {
                            pageMax = data.pages;
                            var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                            var $showLargerDiv = $("#viewLargerDiv");
                            for(var i in data.posts){
                                $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                            }
                            $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                            $("#stylesDiv .singleStyle").mouseenter( function(e){
                                $("#viewLargerDiv").empty().append($(this).clone());
                            });

                            $(".childrenUls a").removeClass("active");
                            $(".childrenUls a:eq("+catIndex+")").addClass("active");

                        }
                    });

                    $(".childrenUls a").click( function(e){
                        catIndex = $(".childrenUls a").index(this);
                        pageNum = 1;
                        $.ajax({
                            url: '/?json=get_category_posts&slug='+catSlugList[catIndex]+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                            success: function(data) {
                                $("#stylesDiv, #viewLargerDiv").empty();
                                pageMax = data.pages;
                                var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                var $showLargerDiv = $("#viewLargerDiv");
                                for(var i in data.posts){
                                    $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                }
                                $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                $("#stylesDiv .singleStyle").mouseenter( function(e){
                                    $("#viewLargerDiv").empty().append($(this).clone());
                                });

                                $(".childrenUls a").removeClass("active");
                                $(".childrenUls a:eq("+catIndex+")").addClass("active");

                            }
                        });

                        return false;
                    });

                    $("#collectionNav p a").click( function(e){
                        if(this.getAttribute("href") === "#Back"){
                            if(pageNum===1){
                                if(catIndex === 0){
                                    return
                                } else {
                                    pageNum = 1;
                                    catIndex--;
                                    originalCat = catSlugList[catIndex];

                                    $.ajax({
                                        url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                        success: function(data) {
                                            $("#stylesDiv, #viewLargerDiv").empty();
                                            pageMax = data.pages;
                                            var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                            var $showLargerDiv = $("#viewLargerDiv");
                                            for(var i in data.posts){
                                                $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                            }
                                            $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                            $("#stylesDiv .singleStyle").mouseenter( function(e){
                                                $("#viewLargerDiv").empty().append($(this).clone());
                                            });

                                            $(".childrenUls a").removeClass("active");
                                            $(".childrenUls a:eq("+catIndex+")").addClass("active");

                                        }
                                    });

                                }
                            } else {
                                pageNum--;

                                $.ajax({
                                    url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                    success: function(data) {
                                        $("#stylesDiv, #viewLargerDiv").empty();
                                        pageMax = data.pages;
                                        var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                        var $showLargerDiv = $("#viewLargerDiv");
                                        for(var i in data.posts){
                                            $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                        }
                                        $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                        $("#stylesDiv .singleStyle").mouseenter( function(e){
                                            $("#viewLargerDiv").empty().append($(this).clone());
                                        });

                                        $(".childrenUls a").removeClass("active");
                                        $(".childrenUls a:eq("+catIndex+")").addClass("active");
                                    }
                                });

                            }
                        } else if(this.getAttribute("href") === "#More"){
                            if(pageNum===pageMax){
                                if(catSlugList.length-1 === catIndex){
                                    return
                                } else {
                                    pageNum = 1;
                                    catIndex++;
                                    originalCat = catSlugList[catIndex];

                                    $.ajax({
                                        url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                        success: function(data) {
                                            $("#stylesDiv, #viewLargerDiv").empty();
                                            pageMax = data.pages;
                                            var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                            var $showLargerDiv = $("#viewLargerDiv");
                                            for(var i in data.posts){
                                                $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                            }
                                            $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                            $("#stylesDiv .singleStyle").mouseenter( function(e){
                                                $("#viewLargerDiv").empty().append($(this).clone());
                                            });

                                            $(".childrenUls a").removeClass("active");
                                            $(".childrenUls a:eq("+catIndex+")").addClass("active");
                                        }
                                    });

                                }
                            } else if(pageNum < pageMax){
                                pageNum++;
                                $.ajax({
                                    url: '/?json=get_category_posts&slug='+originalCat+'&count=12&page='+pageNum+'&exclude=categories,type,url,title_plain,status,excerpt,comments,comment_count,comment_status,tags,attachments,modified,date,author',
                                    success: function(data) {
                                        $("#stylesDiv, #viewLargerDiv").empty();
                                        pageMax = data.pages;
                                        var $collectionDiv = $("#styleCollectionDiv").children("div:eq(1)");
                                        var $showLargerDiv = $("#viewLargerDiv");
                                        for(var i in data.posts){
                                            $collectionDiv.append("<div class='singleStyle'>"+data.posts[i].content+"<p>"+data.posts[i].title+"</p></div>");
                                        }
                                        $showLargerDiv.append($collectionDiv.children("div:eq(0)").clone());

                                        $("#stylesDiv .singleStyle").mouseenter( function(e){
                                            $("#viewLargerDiv").empty().append($(this).clone());
                                        });

                                        $(".childrenUls a").removeClass("active");
                                        $(".childrenUls a:eq("+catIndex+")").addClass("active");
                                    }
                                });
                            } else {
                                return false
                            }
                        }
                        return false;
                    });
                });
                </script>

                <ul class="childrenUls">
                    <?php wp_list_categories('child_of=4&orderby=id&order=DESC&title_li='); ?>
                </ul>
            <?php } ?>

            <br style="clear:both;" />

            <div id="largeViewDiv">
                <div><p>Place mouse over thumbnails to view larger.</p></div>
                <div id="viewLargerDiv"></div>
            </div>
            <div id="styleCollectionDiv">
                <div id="collectionNav"><p class="cMe"><a class="backButton" href="#Back">< Back</a><a class="moreButton" href="#More">More ></a></p></div>
                <div id="stylesDiv"></div>
            </div>
            <br style="clear:both;" />

        <?php } else { ?>
            <?php the_content(); ?>
            <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
        <?php } ?>
    </div><!-- .entry-content -->

    <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<br><br><br><span class="edit-link">', '</span>' ); ?>