How to get current page id and compare it to looped pages inside the same page?
The current queried page can be accessed with get_queried_object(), or if you just need the ID, you can use get_queried_object_id(). However, while comparing the current ID in the loop to the queried object ID will allow you to skip a specific post, it won’t work well with your pagination, because the page that features the … Read more