首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >jQuery快讯-不过滤?

jQuery快讯-不过滤?
EN

Stack Overflow用户
提问于 2011-09-14 10:56:17
回答 1查看 864关注 0票数 1

所以我完全爱上了Orman的“Classica”wordpress主题,但是无法链接到预先过滤的内容总是一个问题。不幸的是,我在1.1.4版本中下载了(并找到了某种程度的解决方案),但是自从升级到1.2之后,我还没有能够实现预期的流沙功能。“‘All”可以工作,但是没有一个实际的过滤器能做到--内容就这样消失了。

1.1.4使流沙/jq过滤沿permalink解决方案工作。

我将代码从旧模板直接复制到新模板,但这并不能解决问题。我试着并行运行这两个版本,并对源代码进行比较,但我看不出有什么不同。我甚至系统地将文件逐个从旧复制到新文件,看看什么能解决这个问题。

实际上,如果有人能指出我的代码中的问题在哪里,..that将非常感激。

http://www.colorspace.am/portfolio

撇开:

下面是我的permalink过滤解决方案的代码。它要求我为每个过滤器构建一个页面,但是现在它已经足够好了。

代码语言:javascript
运行
复制
        <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>

EN

回答 1

Stack Overflow用户

发布于 2011-10-05 05:49:13

functions.php中用于过滤的代码必须用以前的版本替换掉(我想我使用了1.2的补丁)--其他文件都不需要修改。

如果我知道functions.php被改变了,我可能会先看看那里。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7415188

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档