Advertisement
Guest User

wpmcb

a guest
May 28th, 2011
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <?
  2. $fields = $_POST['fields'];
  3. if (is_array($fields)) {
  4.  
  5. ?>
  6. <div id="archive">
  7.  
  8. <?php
  9.  
  10.  
  11. for ($i=0;$i<count($fields);$i++) {
  12. $content = $content . "$fields[$i],\n";
  13.  
  14. }
  15.  
  16.  
  17. query_posts( array( 'category__and' => array($content), 'posts_per_page' => 25, 'orderby' => 'title', 'order' => 'DESC' ) ); ?>
  18. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  19. <div class="entry g1">
  20. <a href="<?php the_permalink(); ?>" class="article-block">
  21. <img src="<?php echo get_post_meta($post->ID, 'thumb', true); ?>" alt="" />
  22. <span class="title"><span><?php the_title(); ?></span></span>
  23.  
  24.  
  25. </a>
  26. </div>
  27. <?php endwhile; endif; ?>
  28. <div class="clear"></div>
  29. </div>
  30. <?php
  31.  
  32. }
  33. ?>
  34.  
  35. <form action="<? $_SERVER["PHP_SELF"];?>" method="post">
  36.  
  37.  
  38. <?php
  39. $portfolio_cats = ( is_array( $theme_options['fields'] ) ) ? array_map( 'absint', $theme_options['fields'] ) : array();
  40. $_region = get_categories('child_of=4');
  41.  
  42. if( $_region ) {
  43. foreach( $_region as $term ) {
  44. ?>
  45. <label class="selectit">
  46. <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 ); ?>
  47. </label>
  48. <?php
  49. }
  50. }
  51.  
  52. $_properties = get_categories('child_of=3');
  53.  
  54. if( $_properties ) {
  55. foreach( $_properties as $term ) {
  56. ?>
  57. <label class="selectit">
  58. <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 ); ?>
  59. </label>
  60. <?php
  61. }
  62. }
  63.  
  64. ?>
  65. <input type="submit" id="searchsubmit" value="" />
  66. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement