Support » Plugin: CMS Tree Page View » Custom posts with "-" in post_type

  • Resolved IllusionMH


    When I’m using TPV plugin in pages with custom posts that contain “-” (dash) in post_type I have JS error in console, because JS engine interprets this as minus

    Uncaught exception: ReferenceError: Undefined variable: products
        cms_tpv_jsondata.companyname-products = [			{

    I propose to change 864 line in functions.php

    cms_tpv_jsondata.<?php echo $post_type ?> = <?php echo $json_data ?>;


    cms_tpv_jsondata["<?php echo $post_type ?>"] = <?php echo $json_data ?>;

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom posts with "-" in post_type’ is closed to new replies.