Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Adding custom id to body tag?


  #1  
Old Feb 22, 2012, 09:43 PM
crashley1784
 
81 posts · May 2009
Ok, I've scoured the forums and can't find an answer. I've googled the problem and have consequently broken my site by playing with code.

How can I add an id to the body tag of each page based on either the page name or its id #?
so either <body id="contact"> or <body id="page-id-6" (whatever!)>, just so long as I can target specific pages in my css? I need it in order to do several things, but most importantly allow my custom menu to display correctly for the current page item.

Thanks!

Most current WP / Ata versions.

Site broken: sorry, no link. Must reinstall
  #2  
Old Feb 23, 2012, 05:53 AM
juggledad's Avatar
juggledad
 
23,667 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Wordpress automaticaly adds a CLASS with a unique id for pages and for the home page you will see the class 'home'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding border around body johannac Header configuration & styling 9 Jan 15, 2011 03:52 PM
adding javascript with <body> onLoad command bcnuggs Center area post/pages 1 Aug 16, 2010 07:22 AM
Removing page name from Body. Also, adding links into Footer OrganicAnalyticsNow Atahualpa 3 Wordpress theme 19 Feb 23, 2010 12:46 PM
[SOLVED] Adding wp_footer before body tag Chester Post-Kicker, -Byline & -Footer 6 Jun 7, 2009 10:24 AM


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


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