theme development - Catagories to the list of the titles in that catagory to the content of the post

admin2025-06-06  0

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 question

Wordpress 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 question

Wordpress 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>
Share Improve this question edited Nov 3, 2018 at 0:42 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Oct 29, 2018 at 21:45 LifestohackLifestohack 1112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The content of the post is called by <?php the_content; ?> https://codex.wordpress/The_Loop_in_Action

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749210009a317282.html

最新回复(0)