javascript - How do I insert output from a PHP return into an HTML <div>? (I'm using WordPress) -
i created quick wordpress shortcode writers can style out subtitle in visual editor of post:
function subtitle( $atts, $content = null ) { homecoming '<p class="subtitle">' . $content . '</p>'; }
i want move output within specified elsewhere in document, example:
<div id="output_here_please"></div> <?php the_content(); /* returned here wherever place shortcode */ ?>
what best way this? there php or wordpress function use, or should create javascript replace innerhtml (i tried didn't know how insert after page loads).
thanks
if function called subtitle that, can insert with:
<div id="output_here_please"> <?php subtitle("value", "this sample content"); ?> </div>
php javascript wordpress
No comments:
Post a Comment