簡體   English   中英

jQuery流沙-不過濾嗎?

[英]jQuery Quicksand — not filtering?

因此,我完全喜歡Orman Clarke的“ Classica” wordpress主題,但是無法鏈接到預過濾的內容始終是一個問題。 不幸的是,我在1.1.4版中下載了(並找到了某種解決方案),但是自從升級到1.2版以來,我還沒有能夠像預期的那樣具有流沙功能。 “全部”有效,但沒有實際的過濾器起作用-內容只是消失了。

1.1.4在永久鏈接的解決方法旁邊有流沙/ jq過濾功能。

我將代碼直接從舊模板復制到了新模板,但這不能解決問題。 我嘗試並排運行兩個版本並比較源代碼,但是我看不出有什么區別。 我什至已系統地將文件從舊到新一個接一個地復制,以查看解決問題的方法。

確實有點煩,所以如果有人可以指出問題在我的代碼中的位置,那將不勝感激。

http://www.colorspace.am/portfolio

在旁邊:

我的永久鏈接過濾解決方案的代碼如下。 它要求我為每個過濾器建立一個頁面,但是到目前為止已經足夠了。

        <h1 class="page-title">
            <?php 
            global $post;
            if(get_post_meta($post->ID, 'heading_value', true) != ''): 
                echo get_post_meta($post->ID, 'heading_value', true); 
            else: 
                _e('Some of my recent work.', 'framework'); 
            endif; 
            ?>
        </h1>

        <!--BEGIN #recent-portfolio  .home-recent -->
        <div id="recent-portfolio" class="home-recent portfolio-recent clearfix">

            <?php while (have_posts()) : the_post(); ?>
            <!--BEGIN .sidebar -->
            <div class="sidebar">
<?php
$Path=$_SERVER['REQUEST_URI'];
if ($Path=="/portfolio")
{
echo "<h3>Filter:</h3>";
echo "<ul id=\"filter\">";
echo "<li class=\"segment-1\"><a data-value=\"all\" href=\"#\">All</a></li>";
wp_list_categories(array('title_li' => '', 'taxonomy' => 'skill-type', 'walker' => new             Portfolio_Walker()));
echo "</ul>";
} 
else {
echo "<a href=\"/portfolio\">← return</a>";
}
?>
            <!--END .sidebar -->

            </div>

            <?php endwhile; ?>



            <!--BEGIN .recent-wrap -->

            <div class="recent-wrap">



                <ul id="items" class="image-grid">



                    <?php 
        $count = 1;
                    $query = new WP_Query();
                    $query_string = 'post_type=portfolio&posts_per_page=-1&orderby=title&order=asc';
                    if($post->post_name != 'portfolio') $query_string .= '&skill-type=' . $post->post_name;
                    $query->query($query_string);
                    while ($query->have_posts()) : $query->the_post(); 
        $terms = get_the_terms( get_the_ID(), 'skill-type' );
                    ?>



                        <li data-id="id-<?php echo $count; ?>" class="<?php foreach ($terms as $term) { echo strtolower(preg_replace('/\s+/', '-', $term->name)). ' '; } ?>">

                        <!--BEGIN .hentry -->
                        <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

                            <div class="post-thumb">
                                <?php tz_lightbox(get_the_ID()); ?>
                            </div>

                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>

                            <!--BEGIN .entry-content -->
                            <div class="entry-content">
                                <?php the_excerpt(); ?>
                            <!--END .entry-content -->
                            </div>

                        <!--END .hentry-->  
                        </div>

                    <?php
                    $count++;
                    ?>

                    </li>

                    <?php endwhile; wp_reset_query(); ?>

                </ul>

            <!--END .recent-wrap -->
            </div>

        <!--END #recent-portfolio .home-recent -->
        </div>

functions.php中用於過濾的代碼必須與以前的版本交換掉(我認為我使用1.2進行了修復)-其他文件都不需要修改。

如果我知道functions.php被更改,我可能會先看那里。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM