Add Condition if ParagraphNumb more than Paragraph Content
-
Add below code inside
insertAdAfterParagraph
and after$paragraphs = explode( $closing_p, $content );
$count = count($paragraphs); if ($paragraph_id > $count) { $paragraph_id = $count/2; }
Above code add condition if paragraph set by ads is more than paragraph content set the paragraph ads by paragraph content divide by 2;
ex:
P. Ads = 999
P. Content = 60
P. Ads > P. Content
P. Ads = 60/2
P. Ads = 30.Ofc, you can change other condition if you like.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add Condition if ParagraphNumb more than Paragraph Content’ is closed to new replies.