# Node-Red Flows in Wordpress

**URL:** <https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363>\
**Category:** General\
**Created:** [25 February 2019 11:07 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363 "2019-02-25T11:07:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)\
**Post date:** [25 February 2019 11:07 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/1 "2019-02-25T11:07:14Z")

</div>

I wonder if anyone has any ideas. I'm trying to publish one of llarger flows in my Wordpress blog - but no matter which way I try it I end up with a mess. I need a Wordpress plug-in that handles json format... I'm using one that handles javascript... and some formatting is going on but when it comes to the Javascript inside a function node, instead of putting each item on it's own line, I get a mess of text separated by backslashes and "n"... i.e.

"id": "d9f5055c.d034d8",  
"type": "function",  
"z": "e7f81119.1bd4",  
"name": "Process heat",  
"func": "var timing=global.get("timing");\nvar now = new Date();\nmsg.payload=timing[(now.getDay()\*24)+now.getHours()];\nmsg.frost=timing[168];\nmsg.away=timing[169];\n\nmsg.temperature=flow.get("incomingTemperature");\nmsg.humidity=flow.get("incomingHumidity");\nmsg.set=msg.payload;\nif (flow.get("manualTimer")) flow.set("manualTimer",flow.get("manualTimer")-1);\nelse flow.set("manual",0);\nmsg.desired=msg.set;\nflow.set("setTemperature",msg.desired);\nmsg.desired+=flow.get("manual");\nif (flow.get("frost")) { msg.desired=global.get("timing")[168]; flow.set("frost",flow.get("frost")-1); }\nif (flow.get("away")) { msg.desired=global.get("timing")[169]; flow.set("away",flow.get("away")-1); }\nif (msg.desired\>msg.temperature) msg.relay=1; else msg.relay=0;\n\nmsg.payload=flow.get("incomingTemperature");\n\nnode.status({fill:"blue",shape:"dot",text:"Set point " + msg.desired + "c - Actual " + msg.temperature +"c"});\n\nnode.send([msg,null]);\nmsg.payload=msg.relay;\nnode.send([null,msg]);\n\n\n\n\n",  
"outputs": "2",  
"noerr": 0,  
"x": 750,  
"y": 500,

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 February 2019 11:15 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/2 "2019-02-25T11:15:45Z")

</div>

We've just had exactly the same question in another topic here: [Wordpress plugin - oneliner code style similar to NR discussion goup](https://discourse.nodered.org/t/wordpress-plugin-oneliner-code-style-similar-to-nr-discussion-goup/8359)

Strange coincidence....

If you updated to the latest wordpress 5.x, then their new editor lets you add a block to your post which you can identify as a code block and it will do the right thing.

---

<div class="post-metadata">

**Author:** ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)\
**Post date:** [25 February 2019 11:44 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/3 "2019-02-25T11:44:51Z")

</div>

When I got to the bottom of this - I found the main issue was in any code, \n appearing instead of actual new lines - I've made a start...

---

<div class="post-metadata">

**Author:** ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)\
**Post date:** [25 February 2019 11:46 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/4 "2019-02-25T11:46:27Z")

</div>

I am on Wordpress 5.x but cannot get away with that horrible editor arrangement and getting images out of resources. I use Microsoft Live Writer and simply paste in images giving them alt text as needed,

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 February 2019 16:57 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/5 "2019-02-25T16:57:45Z")

</div>

:OFFTOPIC:

One of many reasons I've ditched WordPress. I'm now using the Hugo static site generator hosted by Netlify. I use Typora if I want a WYSIWYG editor, mostly I just write Markdown.

---

<div class="post-metadata">

**Author:** ![Petr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/petr/32/6413_2.png) [@Petr](https://discourse.nodered.org/u/Petr)\
**Post date:** [1 March 2019 19:02 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/6 "2019-03-01T19:02:04Z")

</div>

- Instal SyntaxHighlighter Evolved pluggin (3.5.0 in my case)  
For settings see the screenshot:  
 ![Screenshot%20from%202019-03-01%2019-54-34](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/96245cebeb68a158cf3b8d9358ce7e5fd661df2c.png)

Save the settings and use the tag I have found on the the bottom of the settings page:

- `[sourcecode language="plain"]your code here[/sourcecode]`

Than the NR flow in the wordpress page will look similar to the oneliner in the NR forum:  
 ![Screenshot%20from%202019-03-01%2019-58-50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0c6de9b4781b9ac603ead32222869a39478d2a13.png)

---

<div class="post-metadata">

**Author:** ![asroonahan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/asroonahan/32/23603_2.png) [@asroonahan](https://discourse.nodered.org/u/asroonahan)\
**Post date:** [9 June 2020 09:44 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/7 "2020-06-09T09:44:39Z")

</div>

hi  
on my website i have an issue a search button is not appearing  
i inspected it and here is the code:  
  
what is wrong with this code?  
how can I change it for better?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 June 2020 10:11 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/8 "2020-06-09T10:11:30Z")

</div>

Welcome to the forum @asroonahan. You have added your question to the end of a thread about node red in Wordpress that is a year old. It would probably be better to start a new thread unless the question is directly related to the issues there.

Unfortunately your code has not appeared. Could I suggest you start a new thread and try again? Also explain what is the problem with what you have tried so far.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 June 2020 10:15 UTC](https://discourse.nodered.org/t/node-red-flows-in-wordpress/8363/9 "2020-06-09T10:15:48Z")

</div>

Closed on 9 June 2020 10:15 UTC


