Skip to main content
edited body
Source Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19

The twenty-ten edit formfrom the first edit will be...

The twenty-ten edit form the first edit will be...

The twenty-ten edit from the first edit will be...

added 926 characters in body; deleted 3 characters in body
Source Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19
get_header(); ?>
<div id="container">
  <div id="content" role="main">
   <div id="container"><?php $args = array(
      'tax_query' => array(
    <div id="content" role="main">  array(
        <?php $args ='taxonomy' array(=> 'post-format',
          'field' => 'slug',
       'tax_query'   'terms' => array('quote')
        )
      )
    );
   array query_posts( $args );
    if ( have_posts() ) : while ( have_posts() ) : the_post();
      'taxonomy'echo =>get_post_format();
 'post   endwhile; else:
      echo 'no';
    endif;
    wp_reset_query();      
    ?>
  </div><!-format',- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

EDIT 2 - It appears that the WordPress Codex has now changed and the portion on Taxonomy Parameters is only found in Google cache.

EDIT 3 - FINAL WORKING CODE

$args = array(
  'tax_query' => array(
    array(
      'taxonomy' => 'post_format',
      'field' => 'slug',
      'terms' => 'post-format-quote'
    )
  )
);
query_posts( $args );

The twenty-ten edit form the first edit will be...

get_header(); ?>
<div id="container">
  <div id="content" role="main">
    'terms'<?php $args = array(
      'tax_query' => array('quote')
        array(
          'taxonomy' => )'post_format',
          'field'    => 'slug',
 )         'terms'    => 'post-format-quote'
        )
      );
    );
    query_posts( $args );
      if ( have_posts() ) : while ( have_posts() ) : the_post();
      the_title();
      echo get_post_format();
      echo '<br />';
    endwhile; else:
      echo 'no';
      endif;
      wp_reset_query();      
      ?>
            </div><!-- #content -->
        </div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

EDIT 2 - It appears that the WordPress Codex has now changed and the portion on Taxonomy Parameters is only found in Google cache. This problem remains unsolved and unfortunately it is not a simple syntax issue like many want to believe.

get_header(); ?>
        <div id="container">
            <div id="content" role="main">
        <?php $args = array(
                'tax_query' => array(
                    array(
                    'taxonomy' => 'post-format',
                        'field' => 'slug',
                        'terms' => array('quote')
                    )
                )
            );
      query_posts( $args );
      if ( have_posts() ) : while ( have_posts() ) : the_post();
      echo get_post_format();
      endwhile; else:
      echo 'no';
      endif;
      wp_reset_query();      
      ?>
            </div><!-- #content -->
        </div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

EDIT 2 - It appears that the WordPress Codex has now changed and the portion on Taxonomy Parameters is only found in Google cache. This problem remains unsolved and unfortunately it is not a simple syntax issue like many want to believe.

get_header(); ?>
<div id="container">
  <div id="content" role="main">
    <?php $args = array(
      'tax_query' => array(
        array(
          'taxonomy' => 'post-format',
          'field' => 'slug',
          'terms' => array('quote')
        )
      )
    );
    query_posts( $args );
    if ( have_posts() ) : while ( have_posts() ) : the_post();
      echo get_post_format();
    endwhile; else:
      echo 'no';
    endif;
    wp_reset_query();      
    ?>
  </div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

EDIT 2 - It appears that the WordPress Codex has now changed and the portion on Taxonomy Parameters is only found in Google cache.

EDIT 3 - FINAL WORKING CODE

$args = array(
  'tax_query' => array(
    array(
      'taxonomy' => 'post_format',
      'field' => 'slug',
      'terms' => 'post-format-quote'
    )
  )
);
query_posts( $args );

The twenty-ten edit form the first edit will be...

get_header(); ?>
<div id="container">
  <div id="content" role="main">
    <?php $args = array(
      'tax_query' => array(
        array(
          'taxonomy' => 'post_format',
          'field'    => 'slug',
          'terms'    => 'post-format-quote'
        )
      )
    );
    query_posts( $args );
    if ( have_posts() ) : while ( have_posts() ) : the_post();
      the_title();
      echo get_post_format();
      echo '<br />';
    endwhile; else:
      echo 'no';
    endif;
    wp_reset_query();      
    ?>
  </div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
edited tags
Link
goldenapples
  • 9.3k
  • 2
  • 33
  • 39
Rollback to Revision 3
Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19
Loading
edited tags
Link
nobody
  • 2.5k
  • 2
  • 27
  • 32
Loading
added 230 characters in body; added 11 characters in body
Source Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19
Loading
Added code to go along with a comment, since you can't add code to a comment
Source Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19
Loading
Tweeted twitter.com/#!/StackWordPress/status/42726702165671936
Source Link
PNMG
  • 1.4k
  • 1
  • 16
  • 19
Loading