Forked from alana-mullen/Detect the last post in the WordPress loop
Created
February 23, 2019 11:53
-
-
Save techpulsetoday/cbf6e05b803997729ac2db281a67f8b9 to your computer and use it in GitHub Desktop.
Revisions
-
thewirelessguy renamed this gist
Nov 5, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
thewirelessguy created this gist
Nov 5, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <?php if (($wp_query->current_post +1) == ($wp_query->post_count)) { echo 'This is the last post'; } ?> <?php if (($wp_query->current_post +1) != ($wp_query->post_count)) { echo 'This is the not the last post'; } ?>