1

我对 php 的 wordpress api 不是很好,但我正在寻找一种方法来返回我在这里尝试过的 php 中的永久链接格式:http: //codex.wordpress.org/Function_Reference

但什么也没有跳出来。在WP 的管理设置中,我有几个选项

我真正想要的是一种在 php 中获取它的方法,例如:

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

谁能给我一根骨头?

4

1 回答 1

2
<?php
    echo get_option('permalink_structure');
?>
于 2012-04-29T10:34:13.620 回答