|
#1
Sep 24, 2010, 10:55 AM
|
|
|
|
51 posts · Aug 2010
Nieder Sachsen, Germany
|
|
How to Remove HTML Insert from One Page Only?
Hi. I have the following code at ATO>HTML/CSS Inserts>Body Top:
Code:
<div style="text-align:center; width:1119px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_3201009240908334" src="http://www.tjicco.org/wp/wp-content/uploads/2010/09/Just-Header.jpg" usemap="#Image-Maps_3201009240908334" style="border: 0; padding: 0;" border="0" width="1119" height="155" alt="" />
<map id="_Image-Maps_3201009240908334" name="Image-Maps_3201009240908334">
<area shape="rect" coords="139,106,196,128" href="http://www.tjicco.org/wp" alt="" title="" />
<area shape="rect" coords="230,107,311,129" href="http://www.tjicco.org/wp/about-us" alt="" title="" />
<area shape="rect" coords="349,107,424,129" href="http://www.tjicco.org/wp/news" alt="" title="" />
<area shape="rect" coords="459,107,548,129" href="http://www.tjicco.org/wp/donate" alt="" title="" />
<area shape="rect" coords="586,107,688,129" href="http://www.tjicco.org/wp/volunteer" alt="" title="" />
<area shape="rect" coords="729,107,852,129" href="http://www.tjicco.org/wp/photo-gallery" alt="" title="" />
<area shape="rect" coords="889,107,971,129" href="http://www.tjicco.org/wp/contact" alt="" title="" />
</map>
</div>
...but I want this image map to NOT appear on the home page, whose page id is 6. What do I add to CSS Inserts to remove it from the home page ONLY? I am using Atahualpa346 and WP 3.0
Thank you.
Last edited by eric41; Sep 24, 2010 at 04:09 PM.
|
#2
Sep 24, 2010, 03:29 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
I haven't tested but you could give this a shot. It is saying to use that code when not on the home page. Let me know if it works.
HTML Code:
<?php if( !is_home() ) { ?>
<div style="text-align:center; width:1119px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_3201009240908334" src="http://www.tjicco.org/wp/wp-content/uploads/2010/09/Just-Header.jpg" usemap="#Image-Maps_3201009240908334" style="border: 0; padding: 0;" border="0" width="1119" height="155" alt="" />
<map id="_Image-Maps_3201009240908334" name="Image-Maps_3201009240908334">
<area shape="rect" coords="139,106,196,128" href="http://www.tjicco.org/wp" alt="" title="" />
<area shape="rect" coords="230,107,311,129" href="http://www.tjicco.org/wp/about-us" alt="" title="" />
<area shape="rect" coords="349,107,424,129" href="http://www.tjicco.org/wp/news" alt="" title="" />
<area shape="rect" coords="459,107,548,129" href="http://www.tjicco.org/wp/donate" alt="" title="" />
<area shape="rect" coords="586,107,688,129" href="http://www.tjicco.org/wp/volunteer" alt="" title="" />
<area shape="rect" coords="729,107,852,129" href="http://www.tjicco.org/wp/photo-gallery" alt="" title="" />
<area shape="rect" coords="889,107,971,129" href="http://www.tjicco.org/wp/contact" alt="" title="" />
</map>
</div>
<?php } ?>
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#3
Sep 24, 2010, 04:07 PM
|
|
|
|
51 posts · Aug 2010
Nieder Sachsen, Germany
|
|
Would I just tack that on to the end of header.php? If so, I tried that and no cigar. Actually, it seemed to have the reverse effect, where the image map appeared only on the home page instead of removing it from the home page. Any other thoughts? Thanks again.
p.s. Would it help or make any difference to know that I have set Home as the static front page of the site?
Last edited by eric41; Sep 24, 2010 at 04:37 PM.
|
#4
Sep 24, 2010, 07:44 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
I was thinking of putting in ATO>Add HTML/CSS Inserts>CSS Inserts
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#5
Sep 25, 2010, 02:30 AM
|
|
|
|
51 posts · Aug 2010
Nieder Sachsen, Germany
|
|
Sorry to say this didn't do the trick. When I put your code at CSS Inserts, it did in fact remove the image map from the home page, but now it's not appearing anywhere else either! How do I make it appear on every page EXCEPT the home page? Thanks for working on this!
|
#6
Sep 25, 2010, 04:45 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Add an ID to the div like: <div id="one_page">....</div>
then in the CSS Inserts use a
HTML Code:
body #one_page {display:none;}
body.page-id-xx #one_page {display: block;}
where 'xx' is the id of the page you want it on
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
Sep 25, 2010, 07:25 AM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Quote:
Originally Posted by eric41
Sorry to say this didn't do the trick. When I put your code at CSS Inserts, it did in fact remove the image map from the home page, but now it's not appearing anywhere else either! How do I make it appear on every page EXCEPT the home page? Thanks for working on this!
|
It must have been late when I said to put this in CSS Inserts. I meant to put it in ATO>HTML/CSS Inserts>Body Top. Of course Juggledad's solution should work as well.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
|