PHP+WORDPRESS

change the permalink settings – 曹鹏PHP+WordPress

<?php
// set permalink
function caopeng_set_permalink(){
    global $wp_rewrite;
    $wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%postname%/');
}
add_action('init', 'caopeng_set_permalink');
?>

Leave a Reply

学习的梦想

锤炼的彩色