• Resolved torbent

    (@torbentschechnegmailcom)


    Hello,
    I’ve created a test post and used the image hotspot block. Then I included the post on a product detail page like this:

    
    $postContent = get_post(get_field('product_hotspot_post'));
    echo $postContent->post_content;
    

    I do see the image and the hotspot, but the event which is triggered, when clicking on the hotspot does not fire. I do see this error in the console:

    
    ReferenceError: Can't find variable: _unescape
    

    The unsescape.min.js is not included on the product detail page, but currently I do not see why this happens. Can you help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support eugenewhite

    (@eugenewhite)

    Hello there!

    In this case, I may suggest you try to change the:

    $postContent = get_post(get_field('product_hotspot_post'));
    echo $postContent->post_content;

    to:

    $postContent = get_post(get_field('product_hotspot_post'));
    echo do_blocks($postContent->post_content);

    for blocks to work properly. Let me know if it’s helpful or not.

    Thread Starter torbent

    (@torbentschechnegmailcom)

    That works. Thanks!

    • This reply was modified 2 years, 4 months ago by torbent.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using block on product detail page’ is closed to new replies.