|
#1
Jan 18, 2013, 04:52 AM
|
|
Hi! I want to add some extra links that are only shown on some pages in my site. The links will link to "page pages". I have already added some links like that to another page with menus and then I used Style and configure sidebars and added the pages that I didn't want the menu/links to show in. That worked fine.
Then I tried to add a menu and links to the left inner sidebar so the links didn't conflict with the existing links, but then the links from the inner sidebar keep showing up in the frontpage and other places on the site.
Is there an easier way to do this?
I have latest version of Wordpress and Atahualpa.
Best regards Edle Holmin
Last edited by juggledad; Jan 18, 2013 at 06:20 AM.
|
#2
Jan 18, 2013, 06:22 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
I don't understand what you are trying to do. can you supply a detailed example of what you are trying?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Jan 26, 2013, 05:21 PM
|
|
I'm sorry, I found a solution to the problem by adding some buttons.
But I have another question. I have added this to the css insert:
div.widget ul {
list-style-type: none !important;
}
div.widget a:link,
div.widget a:visited {
border-left: 0 !important;
padding-left: 0 !important;
color: #000000 !important;
text-decoration:none;
}
div.widget a:active {
border-left: 0 !important;
padding-left: 0 !important;
color: #9F153E !important;
text-decoration:none;
}
div.widget ul {
list-style-type: none !important;
}
div.widget a:hover {
color: #9F153E !important;
}
I want the active links to show in a different color in the left sidebar, but it doesnt work. It only shows in black color and I want the visitors to see where their at in the page.
|
#4
Jan 26, 2013, 07:16 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
what is the url to the site pointing at an example where it doesn't work?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
Jan 27, 2013, 01:14 AM
|
|
Here is the url: www.fannyholmin.no
In the left siderbar I have some links. I want all of the links, also the sublinks to be red when theire active.
|
#6
Jan 27, 2013, 06:36 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
the reason your CSS doesn't work is that there is other CSS that is more specific that is being used.
Use a code inspector like the firebug extension in firefox to see what is being applied
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
Jan 28, 2013, 04:23 AM
|
|
Ok, I don't get it to work. I used Firebug and tried out with different css. I tried
a:active
div.widget a:active
div.widget td a:active
div.widget ul li a:active
div.widget_nav_menu ul li a:active
div.widget_nav_menu ul li a:active
Could you see if you see what I should put in the css insert?
|
#8
Jan 28, 2013, 04:44 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
try
HTML Code:
div.widget ul li ul li a:active {
color: #00F000;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#9
Jan 28, 2013, 02:23 PM
|
|
Ok, I tried that, but maybe I have misunderstund what active links are. I want the links to stay in a different color when the visitors is in that page (so they can see what page their in). Here is an example: http://steinmarimusic.com/concerts/
In the horizontal menu bar the links turn green when you are in that page. I would like the same in the sidebar in my other page.
|
#10
Jan 28, 2013, 03:47 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
in that case you need to use the 'current_page_item' on the 'li'
You should look at the source of the page and see what classes are added to the different parts of the menu when you click on different pages. It's quite educational
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
Jan 29, 2013, 03:05 AM
|
|
Thank you so much, that worked fine. I added this to the CSS insert:
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 {
color: #9F153E;
}
But my only problem now is that I don't get the red color in the subpages. I used this code:
div.widget li.page_item.page-item-40.current_page_item a {
color: #9F153E;
}
But then I have to add this to every subpage and remember to do so every time I make a new subpage. Can you help me with that?
|
#12
Jan 29, 2013, 05:08 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
when I click on a subpage it becomes red, so I'm now sure what you are trying to do.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13
Jan 29, 2013, 06:40 AM
|
|
Yes, to get the submenu red I added this to the CSS Insert:
div.widget li.page_item.page-item-40.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-53.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-35.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-272.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-289.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-235.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-152.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-226.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-257.current_page_item a {
color: #9F153E;
}
div.widget li.page_item.page-item-244.current_page_item a {
color: #9F153E;
}
But then I have to add this code to every new subpage I add. Can I add a code that will work for all the subpages?
|
#14
Jan 29, 2013, 07:30 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
sure you can do it that way but you don't need every class so why not try
HTML Code:
div.widget li.current_page_item a {
color: #9F153E;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#15
Jan 29, 2013, 08:48 AM
|
|
Thank you, I got confused with all the code. Now I added
div.widget ul li ul li.current_page_item a {
color: #9F153E;
}
And that worked fine for all the subpages.
Thank you SO much for all your help!
|
|