Support » Plugin: Docs to WordPress » [Plugin: Docs to WordPress] I'd love to use this for pages rather than posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author William P. Davis

    (@wpdavis)

    There are two ways you can do this.

    One is to use the the Post Type Switcher, which allows you to switch a post to a page and vice versa. http://wordpress.org/extend/plugins/post-type-switcher/

    The other option is to extend the Docs to WordPress plugin using the pre_docs_to_wp_insert filter. The plugin would look like this:

    <?php
    /*
    Plugin Name: Docs to WP Pages
    */
    
    add_filter( 'pre_docs_to_wp_insert', 'docs_to_wp_pages' );
    function docs_to_wp_pages( $post_array = array() ) {
         $post_array[ 'post_type' ] = 'page';
         return $post_array;
    }

    I haven’t tested this, but it should do the trick.

    Both methods are working brilliantly. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Docs to WordPress] I'd love to use this for pages rather than posts.’ is closed to new replies.