62 posts
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
codepanels says

Hello, I have problems to apply more.

In my index page, I call a template to show post previews:

In my index: ... foreach($posts AS $key=>$post){ global $key; global $post; get_template_part( 'templates/post-unit', 'post-unit' ); }

In the template I use $post->post_content; to show the first 100 words and I put a “Read More” button after the summary.

In my design, I think following criteria is not fulfilled: 6) “Read More” link works properly (links to single post at ”<!-more->” tag location).

What would you offer? This is my last technical criteria before uploading. Thanks.

62 posts
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
codepanels says

... foreach($posts AS $key=>$post){ global $key; global $post; get_template_part( 'templates/post-unit', 'post-unit' ); }
OK, I’ll leave this way and simply use <?php while ( have_posts() ) : the_post(); get_template_part( 'templates/post-unit', 'post-unit' ); .... ?> which will solve all of my problems.
by
by
by
by
by
by