default content
-
Hi, I am trying to populate the private pages with default content. I am using this but it doesnt seem to work. I assume the post type is “private-page”? Is there something I am missing.
Any pointers would be helpful.
Thanks in advance
Richardadd_filter( 'default_content', 'pu_default_editor_content' ); function pu_default_editor_content( $content ) { global $post_type; switch( $post_type ) { case 'private-page': $content = 'Default content for blog posts.'; break; case 'page': $content = 'Default content for pages.'; break; } return $content; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘default content’ is closed to new replies.