What is the best practice to check for pretty permalinks?

The Using Permalinks page on WordPress.org tells you how to check for the permalink structure:

if ( get_option('permalink_structure') ) { echo 'permalinks enabled'; }

The result will be an empty string if permalinks are default, otherwise you will get the permalink pattern though you should not have to worry much about the permalink details if you use Core functions to generate your links.

Leave a Comment

tech