WordPress.org

Ready to get started?Download WordPress

Forums

Post Template
[resolved] Adding to custom post types (2 posts)

  1. Tristan Bacon
    Member
    Posted 1 year ago #

    Hi,

    My site will be making use of custom post types, and I want to adapt your plugin to let me select templates for custom posts. You mention in the readme and the Other Notes section that there is some code for the functions.php file 'below', but I can't find it.

    Can you help?

    Thanks,

    Tristan

    http://wordpress.org/extend/plugins/wp-post-template/

  2. IndiaNIC
    Member
    Plugin Author

    Posted 1 year ago #

    in function.php

    add_filter('cpt_post_types', 'my_custom_post_type');

    function my_custom_post_type($_post_type) {
    $_post_type[] = 'your_post_type'
    return $_post_type;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.