Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

How to Remove HTML Insert from One Page Only?


  #1  
Old Sep 24, 2010, 10:55 AM
eric41's Avatar
eric41
 
51 posts · Aug 2010
Nieder Sachsen, Germany
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  
Old Sep 24, 2010, 03:29 PM
lmilesw's Avatar
lmilesw
 
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  
Old Sep 24, 2010, 04: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 04:37 PM.
  #4  
Old Sep 24, 2010, 07:44 PM
lmilesw's Avatar
lmilesw
 
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  
Old Sep 25, 2010, 02: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, 04:45 AM
juggledad's Avatar
juggledad
 
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  
Old Sep 25, 2010, 06:00 AM
eric41's Avatar
eric41
 
51 posts · Aug 2010
Nieder Sachsen, Germany
Juggledad, thank you very much for your reply. I placed an id in the div so that it looks like this:

Code:
<div id="tjicco_header" 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>

I then placed your two lines of code at CSS Inserts with the page id, like this:

Code:
body #tjicco_header {display:none;}
body.page-id-6 #tjicco_header {display: block;}
It took it off the home page (id=6) alright, but it also took it off of all other pages. Did I put it all in right?

Last edited by eric41; Sep 25, 2010 at 06:05 AM.
  #8  
Old Sep 25, 2010, 06:27 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
sorry, I read teh post wrong, If you just want is gone on the home age use eithor
HTML Code:
body.home #tjicco_header {display:none;}
or
HTML Code:
body.page-id-6 #tjicco_header {display: none;}
and leave out the
HTML Code:
body #tjicco_header {display:none;}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Sep 25, 2010, 07:23 AM
eric41's Avatar
eric41
 
51 posts · Aug 2010
Nieder Sachsen, Germany
Yep, that did it! And it's two birds with one stone because I've found the first info you gave for making it appear on one page only, useful as well. Thanks so much for taking the time! Please know that I will be leaving a donation asap..it's just that I am living in Germany right now, where I have not found work, so I am supporting myself with website creation. So right now I am having to rely on your guys' good graces, but a donation is forthcoming..goodness knows the help you guys provide is worth it!

Thanks again to you both!

Eric
  #10  
Old Sep 25, 2010, 07:25 AM
lmilesw's Avatar
lmilesw
 
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.

Bookmarks



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 03:17 PM
PHP Template and HTML/CSS insert section questions and issues conquestlife Center area post/pages 3 May 9, 2010 07:43 PM
[SOLVED] Help Transferring HTML/CSS Insert Coding to Custom Widgets rnimchuk Header configuration & styling 1 Sep 28, 2009 05:18 AM
Widget or Insert on one page only goldalex Sidebars & Widgets 1 Aug 27, 2009 08:50 PM
504 Gateway Time-Out saving update to HTML Insert:Header JEG Page & Category Menu Bars 1 Apr 20, 2009 10:17 PM


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


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