I want to show a donate button after the post and on the LAST page of paginated posts. While my code totally works, it is probably not the best way to do that. Has anybody a more elegant solution? Since the content (the donate button) is exactly the same, there is no need to call this HTML block twice. Thank you!
global $multipage, $numpages, $page;
if( $multipage && $page == $numpages ) { ?>
Content (on the last page of a paginated post)
<?php }
if ($multipage == 0) { ?>
Content
<?php } ?>