WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Custom posts with "-" in post_type

[Resolved] Custom posts with "-" in post_type

  • 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
    from

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

    to

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

    http://wordpress.org/extend/plugins/cms-tree-page-view/

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