Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $fields = $_POST['fields'];
- if (is_array($fields)) {
- ?>
- <div id="archive">
- <?php
- for ($i=0;$i<count($fields);$i++) {
- $content = $content . "$fields[$i],\n";
- }
- query_posts( array( 'category__and' => array($content), 'posts_per_page' => 25, 'orderby' => 'title', 'order' => 'DESC' ) ); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="entry g1">
- <a href="<?php the_permalink(); ?>" class="article-block">
- <img src="<?php echo get_post_meta($post->ID, 'thumb', true); ?>" alt="" />
- <span class="title"><span><?php the_title(); ?></span></span>
- </a>
- </div>
- <?php endwhile; endif; ?>
- <div class="clear"></div>
- </div>
- <?php
- }
- ?>
- <form action="<? $_SERVER["PHP_SELF"];?>" method="post">
- <?php
- $portfolio_cats = ( is_array( $theme_options['fields'] ) ) ? array_map( 'absint', $theme_options['fields'] ) : array();
- $_region = get_categories('child_of=4');
- if( $_region ) {
- foreach( $_region as $term ) {
- ?>
- <label class="selectit">
- <input value="<?php echo absint( $term->term_id ); ?>"<?php checked( in_array( absint( $term->term_id ),$portfolio_cats ),true ); ?> name="fields[]" type="checkbox"> <?php esc_html_e( $term->name ); ?>
- </label>
- <?php
- }
- }
- $_properties = get_categories('child_of=3');
- if( $_properties ) {
- foreach( $_properties as $term ) {
- ?>
- <label class="selectit">
- <input value="<?php echo absint( $term->term_id ); ?>"<?php checked( in_array( absint( $term->term_id ),$portfolio_cats ),true ); ?> name="fields[]" type="checkbox"> <?php esc_html_e( $term->name ); ?>
- </label>
- <?php
- }
- }
- ?>
- <input type="submit" id="searchsubmit" value="" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement