is there a page id for each page because K2 theme shows only body class
-
Hello
1- Can anyone tell how we add page id on K2 theme pages. because the output from the browser when you view a page on K2 theme shows class id only.
like this below
<body class="wordpress k2 y2009 m05 d16 h19 page pageid-31 page-author-admin page-slug-about loggedin columns-two lang-en">
but i need page id name instead. I create pages in the admin panel by adding a new page.
2- for my last link i need to add “class=page name” and “class=last” in order for my menu to look OK. but i don’t know it looks weird writing class=last and class=page-slug-about in one li.
can you please suggest how i should write my last link both adding the page number and class=last in class tags.
<li class="home"<?php if(is_front_page()) echo ' class="active"'; ?>><a href="">home</a></li> <li class="page-slug-archives"<?php if(is_page('page')) echo ' class="active"'; ?>><a href="?page_id=2">archives</a></li> <li class="page-slug-news"<?php if(is_page('page')) echo ' class="active"'; ?>><a href="?page_id=35">news</a></li> <li class="page-slug-about" class="last<?php if(is_page('page')) echo ' active"'; ?>"><a href="?page_id=31">contact</a></li>
how can i add class=”last” as well as the output name? First three links work ok but the last one. i need to give both class=last class=page-slug-about
- The topic ‘is there a page id for each page because K2 theme shows only body class’ is closed to new replies.