Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter gasa888

    (@gasa888)

    Thanks, it turns out it was the AMP plugin causing the problem.

    Thread Starter gasa888

    (@gasa888)

    Thanks for your help. Im a newbie so thanks for forgiving my slip ups 🙂

    Thread Starter gasa888

    (@gasa888)

    I tried the custom shortcode but it still shows as a link when published.
    https://goldandsilverassets.com/chart-draws/

    I added the following to the functions php

    /* function that just displays the script */
    function insert_tradingview_chart_shortcode() { ?>
    <!-- TradingView Widget BEGIN -->
    <div class="tradingview-widget-container">
      <div id="tradingview_6ed04"></div>
      <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/TVC-GOLD/" rel="noopener" target="_blank"><span class="blue-text">GOLD Chart</span></a> by TradingView</div>
      <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
      <script type="text/javascript">
      new TradingView.widget(
      {
      "width": 600,
      "height": 400,
      "symbol": "TVC:GOLD",
      "interval": "D",
      "timezone": "Etc/UTC",
      "theme": "light",
      "style": "1",
      "locale": "en",
      "toolbar_bg": "#f1f3f6",
      "enable_publishing": false,
      "container_id": "tradingview_6ed04"
    }
      );
      </script>
    </div>
    <!-- TradingView Widget END -->
    <?php
    }
    /* create a shortcode called tradingview_chart that will run the function */
    add_shortcode('tradingview_chart', 'insert_tradingview_chart_shortcode');

    I then added [tradingview_heatmap] to a shortcode block on the page editor.

    • This reply was modified 5 years, 4 months ago by bcworkz. Reason: code fixed
    Thread Starter gasa888

    (@gasa888)

    The page is https://goldandsilverassets.com/chart-draws/
    I have tried 2 widgets. The html for the first is below. The page just shows links rather than embedding the charts.

    <!-- TradingView Widget BEGIN -->
    <div class="tradingview-widget-container">
      <div id="tradingview_6cad2"></div>
      <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/GOLD/" rel="noopener" target="_blank"><span class="blue-text">GOLD Chart</span></a> by TradingView</div>
      <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
      <script type="text/javascript">
      new TradingView.widget(
      {
      "width": 600,
      "height": 400,
      "symbol": "GOLD",
      "interval": "D",
      "timezone": "Etc/UTC",
      "theme": "light",
      "style": "1",
      "locale": "en",
      "toolbar_bg": "#f1f3f6",
      "enable_publishing": false,
      "container_id": "tradingview_6cad2"
    }
      );
      </script>
    </div>
    <!-- TradingView Widget END -->
    • This reply was modified 5 years, 4 months ago by bcworkz. Reason: code fixed
Viewing 4 replies - 1 through 4 (of 4 total)