php - get_post() with a specific class only - Wordpress -


i using wordpress cms site i'm building.

the page template:

    <?php get_header(); ?>      <!-- class here -->      <div id="wrap">         <div id="content" class="column">             <?php if( have_posts() ): while( have_posts() ): the_post(); ?>              <div class="post">              <?php the_content(); ?>              </div>              <?php endwhile; endif; ?>         </div>          <div id="sidebar" class="column">             <?php get_sidebar(); ?>         </div>     </div>  </div>  </div> &nbsp; <div>  <?php get_footer(); ?> 

i need div class of "theslide" called before #wrap (class here) , not call again php follows.

can 1 along lines of "get_post if class=theslide" ?

thank you.

you can use plugin add custom fields post http://wordpress.org/extend/plugins/advanced-custom-fields/

and in loop, can add condition

<?php       if(get_field('your_field_name' )){         //add class       }  ?> 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -