Announcement

Collapse
No announcement yet.

Template in CPT help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Template in CPT help

    I'm trying to list Types templates in CPT attributes, but I cant get it o work.

    I created an MU plugin with this code...

    function my_cpt_post_types( $post_types ) {
    $post_types = ‘products’;
    return $post_types;
    }
    add_filter( 'cpt_post_types', 'my_cpt_post_types' );

    Any suggestions?

  • #2
    I found a resolution.
    Rather than assigning a template to the CPT, I simply used a hook using a conditional with the "is_singular('product')" tag.
    DUHHH why didn't i think of that before

    Comment

    Working...
    X