How to include Publisher in wordpress?

premkumar
premkumar edited December 2016 in Kite Publisher
Please guide me in including Kite Publisher.

I am trying to include below code in wordpress post and it doesn't work



Buy this stock basket at Zerodha





// Only run your custom code once KiteConnect has fully initialised.
// Use KiteConnect.ready() to achieve this.
KiteConnect.ready(function() {
// Initialize a new Kite instance.
// You can initialize multiple instances if you need.
var kite = new KiteConnect("i1chmn3976xs6zru");

// Add a stock to the basket
kite.add({
"exchange": "BSE",
"tradingsymbol": "BNRSEC",
"quantity": 100,
"transaction_type": "BUY",
"order_type": "MARKET",
"product": "CNC"
});

// Add another stock
kite.add({
"exchange": "BSE",
"tradingsymbol": "PHCAP",
"quantity": 50,
"transaction_type": "BUY",
"order_type": "MARKET",
"product": "CNC"
});


// Add another stock
kite.add({
"exchange": "BSE",
"tradingsymbol": "JOINDRE",
"quantity": 100,
"transaction_type": "BUY",
"order_type": "MARKET",
"product": "CNC"
});

// Add another stock
kite.add({
"exchange": "BSE",
"tradingsymbol": "SUMEDHA",
"quantity": 100,
"transaction_type": "BUY",
"order_type": "MARKET",
"product": "CNC"
});

// Add another stock
kite.add({
"exchange": "BSE",
"tradingsymbol": "CATVISION",
"quantity": 100,
"transaction_type": "BUY",
"order_type": "MARKET",
"product": "CNC"
});


// Register an (optional) callback.
kite.finished(function(status, request_token) {
alert("Finished. Status is " + status);
});

// Render the in-built button inside a given target
kite.renderButton("#default-button");

// OR, link the basket to any existing element you want
kite.link("#custom-button");
});

Sign In or Register to comment.