Jump to content

Individual Page in Pages edit?


Mahumba

Recommended Posts

Posted

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

Posted

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}}

 

Posted

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 :blush:

Posted
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.

Posted
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

Posted

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

Posted

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 :blush:

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:

cat_id.thumb.png.ec834d86dbe8bc17d226d00f710cd467.png

Now lets pray.. ?

  • 3 weeks later...
Posted

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...