• Widget bug fix in WordPress. The embed widget from Funda was working before, clueless why it suddenly stopped working. In Public view, it’s not working. Preview mode while logged in to WordPress shows the correct page.
    Here is the screenshot attached. https://ibb.co/M6z43fv
    Either the script can be executed within the post or I have to place this script in head tag etc. I’m using beTheme wordpress
    Thanks in advance.

    • This topic was modified 2 years, 11 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Either the script can be executed within the post or I have to place this script in head tag etc. I’m using beTheme wordpress

    So where are you putting the script now (if not within the post or in the head)?

    From yous screenshot, it seems you’re putting the JavaScript code in some kind of visual editor, and that’s not likely to work. Put the code in an HTML editor/block.

    Thread Starter Ahsan Waqas

    (@ahsan142)

    Thanks for your answer.

    Actually the same embedded script from FUNDA is working on this page https://www.homecrew.nl/rent-out/.
    But the issue is with this page. Script isn’t working on this page https://www.homecrew.nl/reviews-recensies-beoordelingen-klanten-engels/. The Editor & method of placing the script is the same. I cleared the cache etc. But still, the issue is there.
    I found this on Wpbegginer. Is this okay to add a script in funcations.php for this specific page id?

    Adding JavaScript to a Specific WordPress Post Using Code

    If you only want to add JavaScript to a single WordPress post, then you will need to add conditional logic to the code.

    function wpb_hook_javascript() {
      if (is_single ('5')) { 
        ?>
            <script type="text/javascript">
              // your javscript code goes here
            </script>
        <?php
      }
    }
    add_action('wp_head', 'wpb_hook_javascript');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Script widget works only in admin view but not in Public’ is closed to new replies.