Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionWordpress homepage is shown. On the left sidebar catagories are shown. When the user clicks the category the post title related to that clicked category is populated on the middle part. Now when the user clicks the title in the second step, the content is shown in the third step. All the title of the post from that catogery should still be shown in the step 2.
What I have done so far?
I have done till 2 step. Now but when the title is clicked in the 2 step, the list of the post vanishes and only the title is shown.
<div class="container-fluid">
<div class="row">
<div class="col-3">
<?php get_sidebar();?>
</div>
<div class="col-3">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php }
} wp_reset_postdata();?>
</div>
<div class="col-6">
//No idea how to show the content
</div>
</div>
</div>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionWordpress homepage is shown. On the left sidebar catagories are shown. When the user clicks the category the post title related to that clicked category is populated on the middle part. Now when the user clicks the title in the second step, the content is shown in the third step. All the title of the post from that catogery should still be shown in the step 2.
What I have done so far?
I have done till 2 step. Now but when the title is clicked in the 2 step, the list of the post vanishes and only the title is shown.
<div class="container-fluid">
<div class="row">
<div class="col-3">
<?php get_sidebar();?>
</div>
<div class="col-3">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php }
} wp_reset_postdata();?>
</div>
<div class="col-6">
//No idea how to show the content
</div>
</div>
</div>
The content of the post is called by <?php the_content; ?>
https://codex.wordpress/The_Loop_in_Action