Adding Ads script to my website to displace advert

Sudo Tech Posted in General Discussion 4 months ago

I got a script from propellerAds to add to my site. The script is to be added before </body>. Please how do I add this?

Replies
ng Sudo Tech Replied 4 months ago

I got a code to insert Ads directly into newsfeed by editing core file. The code is to show Ads after 5 posts. Is this code right and if yes, where should I insert it in the newsfeed.php.

$postcount = 0;
foreach ($posts as $post) {
$post
count++;
// Code to display the post
echo ossnpluginview('post/view', $post);

// After every 5 posts, insert the ad
if ($post_count % 5 == 0) {
    echo '<div class="ads">';
    echo 'INSERT ADS CODE HERE'; // Replace this with your actual ad code (e.g., Google Adsense or Media.net code)
    echo '</div>';
}

}

ng Sudo Tech Replied 4 months ago

@Arsealan Shah thanks for the reply. I will try that. I can’t use Michael’s component cause I provided wrong url on my first registration. He won’t give me a second chance.

Indonesian Arsalan Shah Replied 4 months ago

Add in page.php file in your theme find this file in your theme or search for ads component here by Michael