Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Page menu (pages-widget): Current page item in post (http://forum.bytesforall.com/showthread.php?t=7457)

unelma Jun 6, 2010 07:29 AM

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!

juggledad Jun 6, 2010 09:18 AM

What is the web site so I can see what you are saying

unelma Jun 6, 2010 09:45 AM

I deleted url adress.

juggledad Jun 6, 2010 05:56 PM

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.

unelma Jun 7, 2010 12:14 PM

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.

juggledad Jun 7, 2010 03:11 PM

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 -->
<td id="right">

        <div id="ace-recent-posts" class="widget AceRecentPostsWidget_display">                                         
                <div class="widget-title"><h3>Lorem ipsum</h3></div>
                <ul>
                          <li><a href="http://yourdomain.com/?p=155">Lorem ipsum </a></li>
                          <li><a href="http://yourdomain.com/?p=151">blog Lorem ipsum </a></li>
                </ul>
          </div> 
         
          <div id="ace-categories" class="widget AceCategoriesWidget_display">
                  <div class="widget-title"><h3>Kategoriat:</h3></div>               
                  <ul>
                        <li class="cat-item cat-item-4"><a href="http://yourdomain.com/?cat=4" title="View all posts filed under Jutut">Jutut</a> (3)</li>
                        <li class="cat-item cat-item-5"><a href="http://yourdomain.com/?cat=5" title="View all posts filed under Jutut2">Jutut2</a> (1)</li>
                </ul>
        </div>
</td>
<!-- / Right Sidebar -->

in the post, there is nothing on the LI's and on the categories, there is cat-item-X (where X is the category number)

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 08:03 PM.

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