WordPress show shortcode under the text

I create shortcode for increase size of text , and works perfectly , the problem it´s always show in the top of text content , no under , i put the shortcode and i can see under te text in editor but always put in the top and no respect the position i put into the visual editor , etc and it´s the same i put tags as p or br , always go to the top

My Code :

Read More
<?php
/*---------------------------------------------------------------------------------------------
* Theme Shortcode - Resize
* Version 1.0
* Description: TFW Resizer Text
---------------------------------------------------------------------------------------------*/
$oplinks='<div style="clear:both;float:right;"><h3 style="text-align: right;"><span style="font-size: large;"><span style="color: #ff9900;"><span style="color: #000000;"><strong>Font Size</strong></span> <span style="color: #0000ff;">» </span><span style="color: #ff6600;"><a id="plustext" onclick="resizeText(1)" href="javascript:void(0);"><span style="color: #bf1616;">Large</span></a> | <a id="minustext" onclick="resizeText(-1)" href="javascript:void(0);"><span style="color: #bf1616;">Small</span></a></div><br/>';

function theme_tfw_sizer()
{
global $oplinks;
echo '<script type="text/javascript">
function resizeText(multiplier) {
if (document.body.style.fontSize == "") {
document.body.style.fontSize = "1.0em";
}
document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em";
}
</script>';
echo $oplinks;
}
add_shortcode('tfw_sizer','theme_tfw_sizer');
?>

Regards

Related posts

Leave a Reply

1 comment