Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patent10021

macrumors 68040
Original poster
Apr 23, 2004
3,577
850
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?
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:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.