{"id":1359,"date":"2017-01-31T18:14:01","date_gmt":"2017-02-01T01:14:01","guid":{"rendered":"https:\/\/guide.weavertheme.com\/?p=1359"},"modified":"2017-01-31T18:21:22","modified_gmt":"2017-02-01T01:21:22","slug":"shortcode-php-x-plus","status":"publish","type":"post","link":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/","title":{"rendered":"Shortcode: [php] &#8211; X-Plus"},"content":{"rendered":"<p>PHP<\/p>\n<p>PHP &#8211; [ php]<\/p>\n<p>[ php]php code[\/php]<\/p>\n<p>The [ php] shortcode allows you use php within a page, post, or text widget.<\/p>\n<p>Shortcode usage: [ php]php code[\/php]<\/p>\n<p>The [ php] and [\/php] act like &lt;?php and ?&gt; in an actual .php file. The PHP code is executed using the PHP exec() function and any resulting output added to the HTML page. If your PHP has any errors, or your system has exec() disabled, there will be no output.<\/p>\n<p>For site security reasons, you also must open the Appearance : Xtreme Plus option page, click the PHP tab, and check the\u00a0<strong>For site security reasons, you must check this to enable the <\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\"> shortcode.\u00a0&lt;\/strong&gt;box.\r\n\r\nImportant note: For Posts and Pages, if your php code spans multiple lines (i.e., you use the Enter key), then you must use the HTML editor view, and check the Raw HTML per page option in the page\/post editor screen. Short PHP snippets on just one line will work from either the HTML or Visual editors. If you use the shortcode in an advanced HTML insertion area, then your end of lines will work as expected.\r\n\r\nExample:\r\n\r\n&#x5B; php]echo 'WordPress Version:'l bloginfo('version');<\/pre>\n<p>&nbsp;<\/p>\n<p>would show something like:<\/p>\n<p>WordPress Version: 4.7.2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP PHP &#8211; [ php] [ php]php code[\/php] The [ php] shortcode allows you use php within a page, post, or text widget. Shortcode usage: [ php]php code[\/php] The [ php] and [\/php] act like &lt;?php and ?&gt; in an <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[98,104,83],"tags":[],"class_list":["post-1359","post","type-post","status-publish","format-standard","hentry","category-shortcodes","category-user-guide","category-xtreme-plus"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Shortcode: [php] - X-Plus - Weaver Xtreme Guide<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shortcode: [php] - X-Plus - Weaver Xtreme Guide\" \/>\n<meta property=\"og:description\" content=\"PHP PHP &#8211; [ php] [ php]php code[\/php] The [ php] shortcode allows you use php within a page, post, or text widget. Shortcode usage: [ php]php code[\/php] The [ php] and [\/php] act like &lt;?php and ?&gt; in an &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/\" \/>\n<meta property=\"og:site_name\" content=\"Weaver Xtreme Guide\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-01T01:14:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-02-01T01:21:22+00:00\" \/>\n<meta name=\"author\" content=\"Weaver\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Weaver\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/\"},\"author\":{\"name\":\"Weaver\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#\\\/schema\\\/person\\\/ba142e05c232b3067ff00af1100a86d6\"},\"headline\":\"Shortcode: [php] &#8211; X-Plus\",\"datePublished\":\"2017-02-01T01:14:01+00:00\",\"dateModified\":\"2017-02-01T01:21:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/\"},\"wordCount\":215,\"publisher\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#organization\"},\"articleSection\":[\"Shortcodes\",\"User Guide\",\"Xtreme Plus\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/\",\"url\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/\",\"name\":\"Shortcode: [php] - X-Plus - Weaver Xtreme Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#website\"},\"datePublished\":\"2017-02-01T01:14:01+00:00\",\"dateModified\":\"2017-02-01T01:21:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/shortcode-php-x-plus\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/guide.weavertheme.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shortcode: [php] &#8211; X-Plus\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#website\",\"url\":\"https:\\\/\\\/guide.weavertheme.com\\\/\",\"name\":\"Weaver Xtreme Guide\",\"description\":\"One Theme to Design Them All\",\"publisher\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/guide.weavertheme.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#organization\",\"name\":\"WeaverTheme\",\"url\":\"https:\\\/\\\/guide.weavertheme.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/guide.weavertheme.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/weaver-xtreme-small.jpg\",\"contentUrl\":\"http:\\\/\\\/guide.weavertheme.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/weaver-xtreme-small.jpg\",\"width\":320,\"height\":74,\"caption\":\"WeaverTheme\"},\"image\":{\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/guide.weavertheme.com\\\/#\\\/schema\\\/person\\\/ba142e05c232b3067ff00af1100a86d6\",\"name\":\"Weaver\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g\",\"caption\":\"Weaver\"},\"description\":\"I created the first version of Weaver in 2010, and have been improving it ever since. My goal has always been to provide the options necessary for non-programmers and non-experts to be able to create highly customized WordPress sites without the need to understand PHP or complex CSS.\",\"url\":\"https:\\\/\\\/guide.weavertheme.com\\\/author\\\/aspenco\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shortcode: [php] - X-Plus - Weaver Xtreme Guide","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Shortcode: [php] - X-Plus - Weaver Xtreme Guide","og_description":"PHP PHP &#8211; [ php] [ php]php code[\/php] The [ php] shortcode allows you use php within a page, post, or text widget. Shortcode usage: [ php]php code[\/php] The [ php] and [\/php] act like &lt;?php and ?&gt; in an &hellip; Continue reading &rarr;","og_url":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/","og_site_name":"Weaver Xtreme Guide","article_published_time":"2017-02-01T01:14:01+00:00","article_modified_time":"2017-02-01T01:21:22+00:00","author":"Weaver","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Weaver","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/#article","isPartOf":{"@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/"},"author":{"name":"Weaver","@id":"https:\/\/guide.weavertheme.com\/#\/schema\/person\/ba142e05c232b3067ff00af1100a86d6"},"headline":"Shortcode: [php] &#8211; X-Plus","datePublished":"2017-02-01T01:14:01+00:00","dateModified":"2017-02-01T01:21:22+00:00","mainEntityOfPage":{"@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/"},"wordCount":215,"publisher":{"@id":"https:\/\/guide.weavertheme.com\/#organization"},"articleSection":["Shortcodes","User Guide","Xtreme Plus"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/","url":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/","name":"Shortcode: [php] - X-Plus - Weaver Xtreme Guide","isPartOf":{"@id":"https:\/\/guide.weavertheme.com\/#website"},"datePublished":"2017-02-01T01:14:01+00:00","dateModified":"2017-02-01T01:21:22+00:00","breadcrumb":{"@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/guide.weavertheme.com\/shortcode-php-x-plus\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/guide.weavertheme.com\/"},{"@type":"ListItem","position":2,"name":"Shortcode: [php] &#8211; X-Plus"}]},{"@type":"WebSite","@id":"https:\/\/guide.weavertheme.com\/#website","url":"https:\/\/guide.weavertheme.com\/","name":"Weaver Xtreme Guide","description":"One Theme to Design Them All","publisher":{"@id":"https:\/\/guide.weavertheme.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/guide.weavertheme.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/guide.weavertheme.com\/#organization","name":"WeaverTheme","url":"https:\/\/guide.weavertheme.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/guide.weavertheme.com\/#\/schema\/logo\/image\/","url":"http:\/\/guide.weavertheme.com\/wp-content\/uploads\/2017\/03\/weaver-xtreme-small.jpg","contentUrl":"http:\/\/guide.weavertheme.com\/wp-content\/uploads\/2017\/03\/weaver-xtreme-small.jpg","width":320,"height":74,"caption":"WeaverTheme"},"image":{"@id":"https:\/\/guide.weavertheme.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/guide.weavertheme.com\/#\/schema\/person\/ba142e05c232b3067ff00af1100a86d6","name":"Weaver","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/02ce192f43948dd62f8998f2abd5781531972c11da36486249ea734d13fa2fb7?s=96&r=g","caption":"Weaver"},"description":"I created the first version of Weaver in 2010, and have been improving it ever since. My goal has always been to provide the options necessary for non-programmers and non-experts to be able to create highly customized WordPress sites without the need to understand PHP or complex CSS.","url":"https:\/\/guide.weavertheme.com\/author\/aspenco\/"}]}},"_links":{"self":[{"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/posts\/1359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/comments?post=1359"}],"version-history":[{"count":0,"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/posts\/1359\/revisions"}],"wp:attachment":[{"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/media?parent=1359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/categories?post=1359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guide.weavertheme.com\/wp-json\/wp\/v2\/tags?post=1359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}