patent10021 macrumors 68040 Original poster Apr 23, 2004 3,577 850 Jun 19, 2014 #1 as you know WP does not display html from content or excerpt fields when using short codes to display posts on pages. Is there a plugin to hack this limitation?
as you know WP does not display html from content or excerpt fields when using short codes to display posts on pages. Is there a plugin to hack this limitation?
960design macrumors 68040 Apr 17, 2012 3,852 1,716 Destin, FL Jun 20, 2014 #2 patent10021 said: as you know WP does not display html from content or excerpt fields when using short codes to display posts on pages. Is there a plugin to hack this limitation? Click to expand... That's a pretty bold statement. A shortcode is written by a developer, it could be written to do anything. What are you looking to do exactly? Display code within a single text area but force all other html to render properly? You could write your own shortcode that uses a php function like: htmlentities() and a <pre> tag to keep your indentation, so something like: Code: $yourStuff = "the html coded stuff would get added here"; $showCode = htmlentities($yourStuff, ENT_QUOTES); return <<<HTML <pre>$showCode</pre> HTML; htmlentities turns html code into their entity form so <bob> becomes something like this <bob> Last edited: Jun 20, 2014
patent10021 said: as you know WP does not display html from content or excerpt fields when using short codes to display posts on pages. Is there a plugin to hack this limitation? Click to expand... That's a pretty bold statement. A shortcode is written by a developer, it could be written to do anything. What are you looking to do exactly? Display code within a single text area but force all other html to render properly? You could write your own shortcode that uses a php function like: htmlentities() and a <pre> tag to keep your indentation, so something like: Code: $yourStuff = "the html coded stuff would get added here"; $showCode = htmlentities($yourStuff, ENT_QUOTES); return <<<HTML <pre>$showCode</pre> HTML; htmlentities turns html code into their entity form so <bob> becomes something like this <bob>
ocabj macrumors 6502a Jul 2, 2009 548 202 Jun 20, 2014 #3 WP docs: http://codex.wordpress.org/Writing_Code_in_Your_Posts WP plugin: https://wordpress.org/plugins/codecolorer/ Alternate blogging platform: http://octopress.org/
WP docs: http://codex.wordpress.org/Writing_Code_in_Your_Posts WP plugin: https://wordpress.org/plugins/codecolorer/ Alternate blogging platform: http://octopress.org/