Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » Forum Usage » Forum How-To »

How to Remove HTML Insert from One Page Only?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Sep 24, 2010, 11:55 AM
eric41's Avatar
eric41
 
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 05:09 PM.
  #2  
Old Sep 24, 2010, 04:29 PM
lmilesw's Avatar
lmilesw
 
10,111 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  
Old Sep 24, 2010, 05:07 PM
eric41's Avatar
eric41
 
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 05:37 PM.
  #4  
Old Sep 24, 2010, 08:44 PM
lmilesw's Avatar
lmilesw
 
10,111 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  
Old Sep 25, 2010, 03:30 AM
eric41's Avatar
eric41
 
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  
Old Sep 25, 2010, 05:45 AM
juggledad's Avatar
juggledad
 
22,327 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
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  
Old Sep 25, 2010, 08:25 AM
lmilesw's Avatar
lmilesw
 
10,111 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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADD HTML/CSS Inserts -- 3.5.1 --- Need to remove default CSS Inserts ortho New Versions, & Updating 0 Jun 23, 2010 04:17 PM
PHP Template and HTML/CSS insert section questions and issues conquestlife Center area post/pages 3 May 9, 2010 08:43 PM
[SOLVED] Help Transferring HTML/CSS Insert Coding to Custom Widgets rnimchuk Header configuration & styling 1 Sep 28, 2009 06:18 AM
Widget or Insert on one page only goldalex Sidebars & Widgets 1 Aug 27, 2009 09:50 PM
504 Gateway Time-Out saving update to HTML Insert:Header JEG Page & Category Menu Bars 1 Apr 20, 2009 11:17 PM


All times are GMT -6. The time now is 03:39 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.