I am hoping someone can help me fix this problem. Here is how I am wishing to display music.
1. Create post with shortcode and give category of “Jams”
2. Have page template that calls category “Jams”
Now, when I use the link to the get the category of “Jams” this works just fine. The problem is I don’t want the “/category/jams” in the url. Also, the current_page_item CSS class does not work for my top level menu.
This is where the problem is. When I create a page template with a loop that pulls in only my category, the player goes all wonky, and does not display any links, just the player and the title of the post.
Here is my code for the template page:
Template Name: JamsPage
<?php $my_query = new WP_Query('category_name=jams');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
link to the PAGE display:
link to ARCHIVE display:
Am I missing something? or is this a bug?
- The topic ‘Page Template getting category not working.’ is closed to new replies.