복붙노트

[WORDPRESS] 워드 프레스 preview_post_link

WORDPRESS

워드 프레스 preview_post_link

해결법


  1. 1.

    add_filter( 'preview_post_link', 'the_preview_fix' );
    
    function the_preview_fix() {
        $slug = basename(get_permalink());
        return "http://www.mywebsite.com/blog/p/$slug";
    }
    
  2. from https://stackoverflow.com/questions/8741485/wordpress-preview-post-link by cc-by-sa and MIT license