How to add one time a new page?
If this code is in functions.php or directly in plugin code, the for loop at the top will run every time WordPress is loaded, and the hook at the end refers to a function which doesn’t exist. So probably what you want is to put the top code in a function: function zed93_create_new_page { for … Read more