开发者

jQuery Quicksand — not filtering?

So I'm totally in love with Orman Clarke's 'Classica' wordpress theme, but being unable to link to pr开发者_开发问答efiltered content was always an issue. Unfortunately, I downloaded (and found somewhat of a solution) in the 1.1.4 release, but since my upgrade to 1.2, I have yet to be able to have quicksand function as intended. 'All' works, but none of the actual filters do - the content simply disappears.

1.1.4 had quicksand/jq filtering WORKING along side the permalink workaround.

I copied the code straight over from the old template to the new, but this does not resolve the issue. I've tried running both versions side by side and making a comparison of the source code, but I can see no difference. I've even systematically copied files over one by one from old to new to see what would resolve the problem.

In a bit of a pickle, really - so if anyone can point out where the issue is in my code ..that would be greatly appreciated.

http://www.colorspace.am/portfolio

Aside:

The code for my permalink filtering solution is below. It requires that I build a page for each of the filters, but it's good enough for now.

        <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>


The code in functions.php for filtering had to be swapped out with a previous versions (I think I used 1.2's for the fix) - none of the other files required modification.

Had I have known functions.php was changed, I'd probably have looked there first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜