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?

Old Feb 22, 2012, 10:43 PM
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.


Most current WP / Ata versions.

Site broken: sorry, no link. Must reinstall
Old Feb 23, 2012, 06:53 AM
juggledad's Avatar
23,738 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


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 04:52 PM
adding javascript with <body> onLoad command bcnuggs Center area post/pages 1 Aug 16, 2010 08:22 AM
Removing page name from Body. Also, adding links into Footer OrganicAnalyticsNow Atahualpa 3 Wordpress theme 19 Feb 23, 2010 01:46 PM
[SOLVED] Adding wp_footer before body tag Chester Post-Kicker, -Byline & -Footer 6 Jun 7, 2009 11:24 AM

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

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