Page menu (pages-widget): Current page item in post
Hi,
I am using Pages Widget in left sidebar. My WP site has both pages and posts. My problem is: I cant put background image (highlighting current page) to the post page. It works fine in page page, but not in post. I have been styling the Page menu like this: ATO: CSS INSERTS: div.widget ul li.current_page_item a, div.widget ul ul li.current_page_item a, div.widget ul ul ul li.current_page_item a { background-image:url('/wp-content/themes/atahualpa/images/linkin_tausta.png') !important; color: #4c381d; font-weight: bold; padding-top: 4px; padding-bottom: 6px; } Could some help me, please :) I am using: WP 2.9.2. Atahualpa 3.4.9 Thanks! |
What is the web site so I can see what you are saying
|
I deleted url adress.
|
The reason you can identify the current page is that the widget adds the class 'current_page' to the LI for teh current page.
In order to know what post you are on, the widget you are using to list the posts needs to have an identifier showing which is the current post and to uniquely identify the link to the post. |
Isnīt there anyway to do it with categories?
I have only too main categories, and it would be so easy and perfect solutions to do it with categories. example: div.widget ul li.cat_news_item a, div.widget ul ul li.cat_news_item a, div.widget ul ul ul li.cat_news_item a { background-image:url('/wp-content/themes/atahualpa/images/linkin_tausta.png') !important; color: #4c381d; font-weight: bold; padding-top: 4px; padding-bottom: 6px; } and same thing with the other category. Uniquely identify the link to the post sound very bad. I mean, I have to update css every time when someones has writed new post. |
Atahualpa doesn't have any control over the category widget. You would have to go into the code for that widget and add some code so it would add a class="current_category' or something like that.
Your right sidebar (with the url changed) is this HTML Code:
<!-- Right Sidebar --> you need to get the widget to put out something you can use. Ask the plugin's author |
All times are GMT -6. The time now is 04:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.