Dashboard
PHP:
8.0.30
OS:
Linux
User:
hoozgot
/
/
home
/
hoozgot
/
www
/
mountainpassions
/
winter
/
wp-content
/
themes
/
peakie-2015
📤 Upload
📝 New File
📁 New Folder
Close
Editing: loop-travel-home.php
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'order' => 'asc', 'orderby' => 'rand', 'posts_per_page' => 3, 'category_name' => 'travel', 'paged' => $paged ); ?> <?php // the query remove_all_filters('posts_orderby'); $the_query = new WP_Query( $args ); ?> <!-- the loop --> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <div class="open-postsbycategory-box"> <?php if ( has_post_thumbnail() ) {the_post_thumbnail( 'img-postsbycategory' ); } ?> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php if(get_field('feature_sub_title')) { echo '<h4>' . get_field('feature_sub_title') . '</h4>';} ?> <div class="excerpt"> <?php the_excerpt(); ?> </div> <div class="linkbox"><a class="linkbox-button" href="<?php the_permalink(); ?>">Read more</a></div> </div> <!--mobile only --> <div class="postsbycategory-box mobile-only"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('img-postsbycategory'); ?></a> <div class="postsbycategory-overbox"> <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <h4><?php $value = get_field( "feature_sub_title" ); if( $value ) { echo $value; } else { echo ''; } ?></h4> <?php html5wp_excerpt('html5wp_index'); ?> <div class="read-more-container"> <div class="read-more"> <a href="<?php the_permalink(); ?>">Read more</a> </div> </div> </div> </div> <?php endwhile; ?>
Save
Cancel