Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show code from Jsfiddle or Github in Wordpress?

Tags:

wordpress

I have created my own personal blog . The free one in wordpress not the premium. I want to show some of my examples from github and jsfiddle in my blog .

Is it possible in free version of the wordpress ? I am not sure.

I am new to word press. Please help.

like image 708
user3427540 Avatar asked Oct 11 '14 07:10

user3427540


People also ask

How do I show code in WordPress?

Simply edit the blog post or page where you want to display the code. On the post edit screen, add a new code block to your post. You can now enter the code snippet in the text area of the block. The code block will show a preview of your code.


1 Answers

Embedding js-fiddle without any plugin

  1. Go to you fiddle and at top menu, click on Embed
  2. You can see a pop-up like this enter image description here
  3. Now at the bottom, you can see written Embed code and infront on that you have option to choose either Use script or Prefer iframe.

On selecting Use script On selecting Prefer iframe

  1. For Wordpress you need to select iframe and then copy the ifram code given i the box.
  2. Now in you Wordpress editor go to Text mode instead of Visual mode and paste the copied code.
  3. Now switch back to Visual mode and you can see js-fiddle embedded in your blog.
like image 67
Varun Sukheja Avatar answered Sep 23 '22 22:09

Varun Sukheja