I’m looking for a way to create an if…else statement hinging on whether pretty permalinks are active or not. So I need something which returns true when permalinks are changed from the default.
if (pretty_permalinks_are_on) {
do this;
} else {
do that;
}
Sort of thing. Just have no idea about the ‘pretty_permalinks_are_on’ part.
If anyone would extend the hand of compassion and throw some crumbs to a php noob, I’d be a grateful learner 🙂
get_option( 'permalink_structure' )
is your friend. If you’re using the default it will be set as an empty string: