I'm editing wordpress theme and I have a problem that theme shows all the images on the page I would like to immediately set up a data-filter = ". 1" that appears on when the page loads, and not to appear all images only images that are under data-filter = ". 1" I named the first filter with that name
I made data-filter=".1",data-filter=".2",data-filter=".3",data-filter=".4",data-filter=".5",data-filter=".6",data-filter=".7" I want page to show data-filter=".1" first as "active"
I want remove all'; and make default 1';
This is now http://postimg.org/image/x9atfq5of/
I want this http://postimg.org/image/729mjrnen/
here is code if I need more code let me know:
<?php global $tx_switch ?>
<?php if($tx_switch['section_portfolio_display']) : ?>
<!-- Portfolio Start
================================================== -->
<section id="portfolio">
<div class="container">
<div class="row">
<div class="section-title wow bounceIn" data-wow-delay=".2s">
<h1><?php echo $textarea = $tx_switch['section_portfolio_title']; ?></h1>
<p><?php echo $textarea = $tx_switch['section_portfolio_subtitle']; ?></p>
</div> <!-- /.Section title -->
<div id="portfolio-body" class="col-md-12 wow fadeInUp" data-wow-delay=".6s" >
<?php
$terms = get_terms('filters');
$count = count($terms);
if ( $count > 0 ){
echo '<ul class="portfolio-filter" id="projects-filter">';
echo '<li data-filter="*" class="active">all</li>';
foreach ( $terms as $term ) {
$termname = strtolower($term->name);
$termname = str_replace(' ', '-', $termname);
echo '<li data-filter="' . '.' . $termname . '">' . $term->name . '</li>';
}
echo '</ul>';
}
?>
<div class="portfolio-container" >
<ul id="da-thumbs" class="da-thumbs " >
<?php
$args = array(
'post_type' => 'portfolio',
'post_status' => 'publish',
);
$portfolio_query = new WP_Query( $args );?>
<?php while($portfolio_query->have_posts()): $portfolio_query->the_post(); ?>
<li <?php echo post_class();?>>
<a>
<img src="<?php echo $text = get_post_meta( $post->ID, '_tx_portfolio_img', true ); ?>">
<div></div>
</a>
<span class="portfolio-buttons">
<a class="test-popup-link" href="<?php echo $text = get_post_meta( $post->ID, '_tx_portfolio_img', true ); ?> " >
<i class="fa fa-search"></i>
</a>
</span>
</li>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul> <!-- /.da-thumbs -->
</div> <!-- /.portfolio container -->
</div> <!-- /.col-md-12 -->
</div> <!--/row -->
</div> <!-- /.container -->
</section> <!-- /#Portfolio -->
<?php endif ; ?>