I am trying to run a function that executes only on the first page of any post. If a post is paginated and you are on page2 or greater, then the function should not run.
Even the WordPress documentation is confused how to do this:
is_paged()
When the page being displayed is "paged". This refers to an archive or
the main page being split up over several pages and will return true
on 2nd and subsequent pages of posts. This does not refer to a Post or
Page whose content has been divided into pages using the
nextpage QuickTag. To check if a Post or Page has been divided
into pages using the nextpage QuickTag, see A_Paged_Page
section.
You can see that it refers to itself. Of course, on my actual site, is_paged() does not work as I want it to.