Instead we could force the permalink flush by using a wp option 'has_flushed_permalink' and if the value is not set to true, we use javascript to load an iframe that loads the permalink options page in a hidden frame (inside admin of course)
This will ensure that newly installed landing page with not encounter the 404 error that surfaces because permalinks aren't always flushed properly
The flush permalink function doesn't always work.
Instead we could force the permalink flush by using a wp option 'has_flushed_permalink' and if the value is not set to true, we use javascript to load an iframe that loads the permalink options page in a hidden frame (inside admin of course)
This will ensure that newly installed landing page with not encounter the 404 error that surfaces because permalinks aren't always flushed properly