75 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 10+ items on Envato Market
QUAL 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.

75 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 10+ items on Envato Market
QUAL 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