Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Mahumba Posted May 6, 2018 Posted May 6, 2018 I scoured my theme trying to edit this page only. But I cannot find how to do this. Here is what happened. AdSense says I am violating a policy. I have a Fishing web site and there is a classified section on it and one section is for hunting items. Here is the link if you want a look. http://fishingboard.thunderbayfishing.com/index.php?/classifieds/guns-ammo-and-bows/ What I want to do is remove the adsense ads from it but I have used the global template and if I remove the ads I lose them from every page! Is it possible to just edit this page only to remove the ads? Roger
Mahumba Posted May 6, 2018 Author Posted May 6, 2018 Good question. Ha HA. I have the latest update and working on a lap top...... if that helps Roger
Daniel F Posted May 6, 2018 Posted May 6, 2018 You could use a special condition including the app to only show it if the app is not the pages app. {{if \IPS\Dispatcher::i()->application->directory !== 'cms'}} ad code {{endif}}
Mahumba Posted May 6, 2018 Author Posted May 6, 2018 I am not a coder by any means. So I just ad that condition and all will be well? Roger
Heosforo Posted May 6, 2018 Posted May 6, 2018 Yes, but I think this will remove your ads from all the classifieds. You just want to remove it from one category. Is the same? if yes, it would be more convenient to contact the author, I never used that app
Mahumba Posted May 6, 2018 Author Posted May 6, 2018 No mine is not the same. And I just want the adsense ads off of the one category. Roger Roger
Heosforo Posted May 6, 2018 Posted May 6, 2018 22 minutes ago, Mahumba said: No mine is not the same. And I just want the adsense ads off of the one category. ? How did you build that classifieds? If it was done with Pages app, it would be easier to help. But need to confirm.
steve00 Posted May 6, 2018 Posted May 6, 2018 28 minutes ago, Mahumba said: No mine is not the same. And I just want the adsense ads off of the one category. Roger Roger Which category do you NOT want it on
Mahumba Posted May 6, 2018 Author Posted May 6, 2018 This one: http://fishingboard.thunderbayfishing.com/index.php?/classifieds/guns-ammo-and-bows/ Roger
steve00 Posted May 6, 2018 Posted May 6, 2018 and where would the ads usually be placed on other pages ?
Mahumba Posted May 6, 2018 Author Posted May 6, 2018 Basically all in the same places as that one page. Like a template.
Heosforo Posted May 7, 2018 Posted May 7, 2018 @Mahumba Could you solve it? I think we can try another way, let me know.
steve00 Posted May 9, 2018 Posted May 9, 2018 the only way I can think of is for some code of some sort to check what url is being viewed and if on certain url then do not show ads this is beyond my expertise so hopefully someone else can help with some sort of code
Heosforo Posted May 9, 2018 Posted May 9, 2018 Sorry, with the other way I had a conflict and I did not get it. The idea was doing this through global Template, but don't know how We could try this, not the best way but could it work: 1) Open your Record template: Page Management --> Templates --> Display --> Record 2)Add this on top: {{if \in_array($record->container()->id, [1, 2, 3])}} <style> .ipsAdvertisement {display: none;} </style> {{endif}} 1, 2, 3 are the category ID's. You'll have to add your own categories (those who are going to hide advertising) or just one. To find what's your category ID go to your admin category list, see here: Now lets pray.. ?
Mahumba Posted May 26, 2018 Author Posted May 26, 2018 I have tried a plethora of ideas here and beyond. I cannot seem to get this to work. It seems to be an all or nothing type of thing............ Thanks to those who gave some ideas. I still need to figure out a way to accomplish this so if anyone figures it out.......... PUHLEASE let me know! Roger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.