Ads on category pages

Posted in: Newspaper
Post count: 5

Is it possible to have ads between the articles on the category pages? I believe it should be possible. I have searched your documentation, but I can’t see how. Regarding to my client, this should be an important feature.

Here’s a typical category page
https://hardworkout.totalweb.no/nyheter/kosthold-ernaering/

My client want ads between some of the articles in the main column

Could you point me in the right direction?

Thanks in advice.

Regards
Rune

Post count: 23312

Hi Rune,

Unfortunately, please notice that our theme does not have any such an option that allows you to add some ads to your posts on category only if you will make some adjustments in the code which involve custom work. If you want to add some ads in your categories pages you should edit the theme core files and add it to the code, according to our documentation here -> https://forum.tagdiv.com/topic/advertising-block-in-category-page/
After this, using a bit of CSS code you should adjust it to have a good look. Also, if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom services at the moment, sorry!

Thanks for your understanding!

Post count: 5

Hi Catalin

I have followed your instruction, and was able to create an ad space before the articles on category pages. If I want to have an ad space for instance between the 3. and 4. article I have to modify the category article loop. Which theme core file do I have to modify?

Thanks in advice.

Regards
Rune

Post count: 23312

Hello Rune,

Notice that what you want is not easy to get and you should create a code which put automatically the ad space after each 3 or 4 articles.
You can add the code like this – http://screencast.com/t/W7VY918Dr3Pw

$adcounter++;
if (is_category()) {
if ($adcounter == 2) {
echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
}
elseif($adcounter == 4){
echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]');
}
}

Hope this helps!

Thanks for your understanding!

Post count: 5

I believe this should work. Thanks for helping me.

Regards
Rune

Post count: 5

hai,I want to edit td-header-sp-top-menu via editor, using html?
where is the position of the code?

null

Post count: 23312

Hi,

If you want to make some changes to the top menu section, you should check here -> https://www.screencast.com/t/D5F30PD6T and the top menu bar can be changed from here -> https://www.screencast.com/t/PqYtIqOb4
If is not what you mean, please provide more details so I will be able to provide a more accurate response.

Hope this helps!

Thanks.

Post count: 5

hi catalin, thanks for the help. I’ve found the answer. thanks

Post count: 9

Could we get an updated look at where we would put the code referenced above as the loop.php coding has changed quite a bit since 2015.

Thanks for any help you can provide.

Post count: 18283

Hello !

The loop.php in now changed it’s path to this one: https://www.screencast.com/t/bnykYDVm

Thank you !

Post count: 9

I know where the loop.php is located, I am wanting to know where in loop.php I should input this code

$adcounter++;
if (is_category()) {
if ($adcounter == 2) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);
}
elseif($adcounter == 4){
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘);
}
}

That was mentioned by Catalin back in 2017 since the format of loop.php has changed so much since then.

Thanks

Post count: 18283

Hello !

You can add it after this: https://www.screencast.com/t/czlnbXGZ

Thank you !

Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.