|
|
#1 |
|
WordPress question regarding Categories and Posts.
I'm currently trying to make a menu on a page which would display a vertical list of four items. These items are post names which belong to a category named "name_of_menu".
Here's the code for the loop so far: Code:
<ul> <?php $posts = get_posts( "category_name=name_of_menu&numberposts=4&orderby=date&order=ASC" ); foreach($posts as $post) : ?> <li> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> </li> <?php endforeach; ?> </ul> If I use something like Code:
.current_page_item > a,
.current-post-ancestor a,
.current_page_ancestor > a {
color: #aabbcc;
}
Code:
<li><?php if (is_home()){echo " class="current_page_item";}?>>
Anyone ever deal with this issue before and could provide some help? |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 11:30 AM.






Linear Mode
