Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • When I received this message, it was because I was logged into my WP site.

    Data started working when I did the following:
    Log out, click on the posts/pages that the plugin tracks, and then see if the data populates.

    I believe there’s an option that is defaulted to not track views when you are logged into your site.

    Thread Starter oliversos

    (@oliversos)

    I think I figured it out. You have to also define the custom post type in the args. For example:

    $args = array(
    ‘title’ => ‘ ‘,
    ‘post_type’ => array(‘post_type_a’, ‘post_type_b’),
    ‘taxonomy’ => array(‘tag_a’,’tag_b’)
    );
    do_utcw( $args );

    That seems to have worked for me.

    I answered my own question, the code to add is in the “Other Notes” section of the plugin page. Simply add it to functions.php and add your custom post type name:

    /**
    * Hooks the WP cpt_post_types filter
    *
    * @param array $post_types An array of post type names that the templates be used by
    * @return array The array of post type names that the templates be used by
    **/
    function my_cpt_post_types( $post_types ) {
    $post_types[] = ‘movie’;
    $post_types[] = ‘actor’;
    return $post_types;
    }
    add_filter( ‘cpt_post_types’, ‘my_cpt_post_types’ );

Viewing 3 replies - 1 through 3 (of 3 total)