コード例 #1
0
 function tfuse_pre_get_posts($query)
 {
     global $TFUSE;
     $ids = $p_ids = array();
     if ($query->is_search && $TFUSE->request->isset_GET('tax_games') || $query->is_search && $TFUSE->request->isset_GET('tax_reviews')) {
         $search = $TFUSE->request->GET('s');
         if ($search == '~') {
             $all_posts = tfuse_get_search_posts();
             $all_posts->is_search = true;
             $all_posts->is_archive = false;
             global $wp_query;
             $wp_query = $all_posts;
         }
     }
     return $query;
 }
コード例 #2
0
                ?>
">x</i></a></li>
                        <?php 
            }
            ?>
                    <?php 
        }
        ?>
                </ul>
            </div>
        <?php 
    }
    ?>
        <ul class="posts-grid">
            <?php 
    $all_posts = tfuse_get_search_posts();
    if ($all_posts->have_posts()) {
        $count = 0;
        while ($all_posts->have_posts()) {
            $all_posts->the_post();
            $count++;
            get_template_part('listing', 'games');
        }
    } else {
        ?>
					 <h5><?php 
        _e('Sorry, no posts matched your criteria.', 'tfuse');
        ?>
</h5>
		   <?php 
    }