0
Posted on 1:15 PM by Softminer and filed under

Replace following line:

<?php  the_content('More >>'); ?>

with,

<?php
  $content = apply_filters('the_content', $post->post_content);  //get the post content store in $content
  $save = explode("</p>", $content);  //Separate the content into <p> blocks
  $tcount=0; //this is count for number of <p> blocks
  $adon=0;  //this is a variable so you don't show ads more than once.
  foreach($save as $item) {
    echo $item;  //print the <p> block
    echo "</p>"; 
    if(preg_match('/<p> /',$item)==0 && $tcount>=1 && $adon==0) {
                                $adon=1;
?>

text goes here

<?php
    }
 if(preg_match('/<p> /',$item)==0 && $tcount>=4 && $adon==1) {
                                $adon=2;
?>

<?php
   }
   $tcount++;
 }
?>
0
Posted on 10:54 AM by Softminer and filed under

1. to disable auto draft you have to add in wp-cofig.php this line
define(’WP_POST_REVISIONS’, false);

2.in older version of wordress:

Select "wp-admin" folder. Scroll down and select "post-new.php" file.
Locate the line code titled "wp_enqueue_script('autosave')." Delete this line in order to disable the "auto save" draft feature on your new posts.

3. in functions.php in your wp-content/theme folder
remove_post_type_support( 'post', 'revisions' );