wheelus12
Forum Replies Created
-
Ha. I read the supports all the time and people help others with a few lines of code. So, I thought I would try to receive the same type of help due to the developer nature of the site. I didin’t know I would be pointed in this direction. Thanks for what you’ve done so far.
The post arrange themselves side-by-side until it reaches a count of four. You can see a screenshot if you follow the link below.
https://drive.google.com/open?id=0B6cHzj9WZ5IAdjh0b1BLNHFvTkU
Using the code I supplied to you, what would I do, or how would I write the code using get_the_category to bring in the current post category and then use a new the category type to query my posts? Is there anyway you could show me using my code? Thanks
I should have been more descriptive. I have each post coming in styled as a square with the title, featured image, excerpt, etc… I’ve been using:
<?php $postslist = get_posts('numberposts=4'); foreach ($postslist as $post) : setup_postdata($post); ?> <article class="post-th"> <a>"> <img src="<?php the_field('feature_image2'); ?>"> <div class="post-th-info"> <h3><?php the_title(); ?></h3> <p><i class="fa fa-clock-o"></i> <?php echo the_time('l, F jS, Y'); ?> </p> <p> <?php the_excerpt(); ?> </a><a>"> <?php comments_number(); ?> </p> <?php the_category(' ');?> </div> </a> </article> <?php endforeach ?>
To display the posts but the way I have it written is to bring in the latest posts. I want to have a query on the single.php file to query the category of the post being read by the visitor and display any additional posts with the same category with format list above.
[moderated to fix code block]