$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>theme development - Mix it up & Wordpress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

theme development - Mix it up & Wordpress

matteradmin10PV0评论

I'm trying to create a MixItUp of articles. Those articles are in my category "Projet" which as 5 sub-categories. My problem is that I can't sort them with my sub-cat controls. If someone can explain me why it doesn't work it would be marvellous. Here is my code :

    <div class="col l9 mixitupcontainer pull-l3">

                    <?php 
                            $args = array(
                            'post_type'=>'post',
                            'orderby'=>'asc',
                            'category_name'=> 'projet',
                            );
                            $my_query = new WP_Query($args);
                            if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>  


                        <a href="<?php the_permalink(); ?>">
                            <div class='col l4 vignette-pro mix <?php foreach(get_the_category() as $category) { echo $category->slug . ' ';} ?>'>
                             <!-- My content -->
</div>
</a>
                      <?php 
                            endwhile;
                            endif;
                       ?>

                      <!-- Controls -->
                 <div class="controls">


                        <form action="#">
                            <h1>Catégories</h1>
                            <p>
                              <label>
                                <input name="group1" type="radio" checked class="control" data-filter="all" />
                                <span>Tous</span>
                              </label>
                            </p>
                            <?php 
                $categories=  get_categories();
                foreach ($categories as $category) 
                    echo '<p>
                              <label>
                                <input name="group1" type="radio" data-filter="'.$category->category_nicename.'">
                                <span>'.$category->cat_name.'</span>
                            </label>
                        </p>';
                ?>

                        </form>
                    </div>

Html and jQUERY works, sub-cat are in the class="" but it doesn't sort articles.

Sorry for my bad writing skills, and thanks for help !

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far