Alex
Alex

Reputation: 3790

wordpress get permalink format in php

I'm not great with the wordpress api for php but I'm looking for a way to return the permalink format in php I've tried over here: http://codex.wordpress.org/Function_Reference

but nothing jumps out. In the admin settings for WP i have a few options

what I really want is a way of getting this in php like:

get_permalink_format();  // would give me the rewrite rule as a string?

Can anyone throw me a bone?

Upvotes: 1

Views: 349

Answers (1)

Nadh
Nadh

Reputation: 7243

<?php
    echo get_option('permalink_structure');
?>

Upvotes: 2

Related Questions