Comments on: Understanding The Loop: WordPress’s Way of Showing Posts https://wpshout.com/the-loop-wordpress/ A hub for advanced WordPress users, developers & savvy business owners. Tue, 27 Apr 2021 14:37:13 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Chris Quinn https://wpshout.com/the-loop-wordpress/#comment-21982 Mon, 24 Sep 2018 01:59:28 +0000 https://wpshout.com/?p=16578#comment-21982 Jim,

I know your comment is old, did you ever fix your issue? I went through a couple pages on your pagination and didn’t see any duplicates. I like the design/layout of your site. If you still need help, let me know, gratis of course.

Chris

]]>
By: Emily https://wpshout.com/the-loop-wordpress/#comment-21980 Mon, 13 Aug 2018 03:30:24 +0000 https://wpshout.com/?p=16578#comment-21980 That’s a short and sweet introduction to WordPress’s loop. Every WordPress theme designer and developer needs to understand this concept.

]]>
By: Arne https://wpshout.com/the-loop-wordpress/#comment-21979 Fri, 06 Jul 2018 13:01:33 +0000 https://wpshout.com/?p=16578#comment-21979 In reply to Vladimir Djurovic.

If there are no posts you will display something else (front-page, other page) so the user wont get an error. Therefore you need the if (+ else) statement.

]]>
By: Alex https://wpshout.com/the-loop-wordpress/#comment-21978 Wed, 04 Jul 2018 16:16:56 +0000 https://wpshout.com/?p=16578#comment-21978 Great post David.

]]>
By: Vladimir Djurovic https://wpshout.com/the-loop-wordpress/#comment-21977 Wed, 04 Jul 2018 07:13:16 +0000 https://wpshout.com/?p=16578#comment-21977 Hi, David

this is great post. Very informative, I’ve enjoyed reading it. However, I have a question. Do we really need if statement here?

if ( have_posts() ) :
while ( have_posts() ) :

I would think that only while would be enough? If there are no posts, then have_posts() will return false, and while will complete immediately. Is this correct?

I’m not sure if I can format code here, so I’ve just used plain font :-).

]]>
By: Rukhsar https://wpshout.com/the-loop-wordpress/#comment-21976 Tue, 03 Jul 2018 15:34:52 +0000 https://wpshout.com/?p=16578#comment-21976 Great work David.

Fantastic post keep posting the post like this in future.

]]>