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’);

Daily Visit GK on myshort.in

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

https://wordpress.org/plugins/quick-adsense/screenshots/

 

Buy online Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book Buy online Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book

Best Book for Railway vacancies: 130000 Job Non-Technical CBT Question Bank competition all Exam: Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book Buy online Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book

Best Book for Railway vacancies: 130000 Job Non-Technical CBT Question Bank competition all Exam:

https://amzn.to/2CfZxnu

General Science GK in Hindi and English Samanya Vigyan for Bhartiya Railways RRB

https://amzn.to/2UAZABs

https://amzn.to/2TyikFe

General Science in English for RRB Junior Engineer, NTPC, ALP & Group D Exams

https://amzn.to/2CibCIN

Best Book for Rajasthan Police LDC Patwar RAS Level and Rajasthan competition all Exam:

Rajasthan History Rajasthan ka itihas Kala Sanskriti Best Book

https://amzn.to/2F8EKnC

https://amzn.to/2XTvniO

Rajasthan Economy Best Book for all competition Exam:

https://amzn.to/2XTLAVj

Rajasthan Geography Best book for all competition Exam:

https://amzn.to/2CkWgmS

Indian political, economics, geography Best Book for IAS RAS 1st 3nd 3rd grade teacher and all exam all Exam in hindi and english

Indian political book: https://amzn.to/2T2Ckuf

Indian political book: https://amzn.to/2CeJTbO

Indian economics book: https://amzn.to/2NYYBIy

Indian history book english: https://amzn.to/2T5uK1X

Indian history book hindi: https://amzn.to/2Ciwhw2

Ecology and Environment book: https://amzn.to/2ESjdOs

World geography book Best Book for IAS RAS 1st 3nd 3rd grade teacher and all exam all Exam in hindi and english

World geography book: https://amzn.to/2CcGMBh

world history: https://amzn.to/2T2wQQg

Best book for Indian history in hindi by Krishna Reddy (Author) and world history

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