How to add content code in Middle of Post and create shortcode

WordPress 0 Comments

How to add content or text or any code in Middle of the wordpress Post and how to create short code in wordpress

1st tips and trick 

This code add in function.php 

add_filter(‘the_content’, ‘wpse_ad_content’);

function wpse_ad_content($content)
if (!is_single()) return $content;
$paragraphAfter = 2;   //  Enter number of paragraphs to display ad code and text after paragraphs  .
$content = explode(“</p>”, $content);         //  paragraphs  code
$new_content = ”;
for ($i = 0; $i < count($content); $i++) {
if ($i == $paragraphAfter) {
$new_content.= ‘<div style=”width: 260px; height: 260px; padding: 5px 6px 6px 0; float: left; margin-left: 0; margin-right: 14px;”>’;
$new_content.= ‘//Enter text code here and other content’;
$new_content.= ‘</div>’;

$new_content.= $content[$i] . “</p>”;    //  paragraphs  code

return $new_content;



2nd tips and trick 

Used the Quick Adsense Plugin in WordPress


Bank PO clerk, SSC, Railway (RRB), IBPS, UPSC, IAS, RAS, SBI, 1st 2nd 3rd grade teacher,REET, TET, Rajasthan police SI, Delhi police, के महत्वपूर्ण सवाल जवाब के लिए रजिस्टर करे
आप करेंट अफेयर्स, Job, सामन्य ज्ञान ओर सभी exams संबंधित Study Material की जानकारी हैतु इस पेज को Like and Visit करे

share..Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0