{"id":61,"date":"2019-01-02T01:04:06","date_gmt":"2019-01-02T01:04:06","guid":{"rendered":"https:\/\/www.pixemweb.com\/devwp\/?page_id=61"},"modified":"2019-01-02T01:04:06","modified_gmt":"2019-01-02T01:04:06","slug":"code-embed-demonstration","status":"publish","type":"page","link":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/","title":{"rendered":"Code Embed Demonstration"},"content":{"rendered":"<p>As a development theme, it&#8217;s only fitting that it&#8217;s easy for people to share code. DevWP uses Prism.js which is great for adding and sharing code.<\/p>\n<p><strong>How to use Prism:<\/strong><\/p>\n<ul>\n<li>First thing to note is that I recommend only using the text editor when sharing code since the visual editor can cause issues with embedded code.<\/li>\n<li>Next, check out how to properly embed code by using the pre tag followed by the code tag which will need a class with the language-js or language-php etc in order to work.<\/li>\n<li>Then in between the opening and closing pre &amp; code tags, place your code<\/li>\n<li>You can checkout the basic usage on the <a href=\"https:\/\/prismjs.com\/#basic-usage\" target=\"_blank\" rel=\"noopener\">Prism <\/a>Website<\/li>\n<\/ul>\n<pre><code class=\"language-js\">\r\nfunction square(number) {\r\n  return number * number;\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>As a development theme, it&#8217;s only fitting that it&#8217;s easy for people to share code. DevWP uses Prism.js which is great for adding and sharing code. How to use Prism: First thing to note is that I recommend only using the text editor when sharing code since the visual editor can cause issues with embedded code. Next, check out how<a class=\"moretag\" href=\"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-61","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Code Embed Demonstration - DevWP<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code Embed Demonstration - DevWP\" \/>\n<meta property=\"og:description\" content=\"As a development theme, it&#8217;s only fitting that it&#8217;s easy for people to share code. DevWP uses Prism.js which is great for adding and sharing code. How to use Prism: First thing to note is that I recommend only using the text editor when sharing code since the visual editor can cause issues with embedded code. Next, check out howContinue Reading\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/\" \/>\n<meta property=\"og:site_name\" content=\"DevWP\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/code-embed-demonstration\\\/\",\"url\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/code-embed-demonstration\\\/\",\"name\":\"Code Embed Demonstration - DevWP\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/#website\"},\"datePublished\":\"2019-01-02T01:04:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/code-embed-demonstration\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/code-embed-demonstration\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/code-embed-demonstration\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code Embed Demonstration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/#website\",\"url\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/\",\"name\":\"DevWP\",\"description\":\"Learn WordPress Development\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pixemweb.com\\\/devwp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Code Embed Demonstration - DevWP","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/","og_locale":"en_US","og_type":"article","og_title":"Code Embed Demonstration - DevWP","og_description":"As a development theme, it&#8217;s only fitting that it&#8217;s easy for people to share code. DevWP uses Prism.js which is great for adding and sharing code. How to use Prism: First thing to note is that I recommend only using the text editor when sharing code since the visual editor can cause issues with embedded code. Next, check out howContinue Reading","og_url":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/","og_site_name":"DevWP","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/","url":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/","name":"Code Embed Demonstration - DevWP","isPartOf":{"@id":"https:\/\/www.pixemweb.com\/devwp\/#website"},"datePublished":"2019-01-02T01:04:06+00:00","breadcrumb":{"@id":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pixemweb.com\/devwp\/code-embed-demonstration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pixemweb.com\/devwp\/"},{"@type":"ListItem","position":2,"name":"Code Embed Demonstration"}]},{"@type":"WebSite","@id":"https:\/\/www.pixemweb.com\/devwp\/#website","url":"https:\/\/www.pixemweb.com\/devwp\/","name":"DevWP","description":"Learn WordPress Development","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pixemweb.com\/devwp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/pages\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":0,"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/pages\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pixemweb.com\/devwp\/wp-json\/wp\/v2\/media?parent=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}