Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Category menu to show the category posts in the dropdown


  #1  
Old Jun 24, 2009, 02:02 AM
gjchandler
 
1 posts · Jun 2009
Minnesota
I would like to display the posts within specific categories in the category menu drop–down.

I've done something like this before in a different theme that was... well, more simple.

My category "Articles" displayed the posts within that category on a drop–down menu.

Code:
<li class="Largenav"><h2><?php _e('Articles'); ?></h2>
<ul> <?php
	 global $post;
	 $myposts = get_posts('numberposts=5&category=4');
	 foreach($myposts as $post) :
	 ?>
	    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
	 <?php endforeach; ?> 
 </ul></li>
Either where would I place this code in Atahualpa, or how else may I achieve the post–drop–down in this theme?
  #2  
Old Aug 11, 2009, 07:26 AM
sam1327
 
3 posts · Aug 2009
I would *really* like to be able to do this also. Clicking on the category dropdown menu to go directly to the post will open up my comments section, so visitors won't have to click twice.

So far I haven't been able to figure out how to do this, so I hope Flynn can help.
  #3  
Old Aug 11, 2009, 02:05 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Where exactly in the layout do you want to put that?
  #4  
Old Aug 11, 2009, 08:25 PM
sam1327
 
3 posts · Aug 2009
Hi Flynn,

I can't speak for gjchandler, but I myself meant on the horizontal navigation menu at the top.

So it's something like Category hover->dropdown action->Click to Individual posts within the Category
  #5  
Old Aug 15, 2009, 11:52 AM
Prose
 
2 posts · Aug 2009
Hi Flynn: I want to +1 this feature. I'd like to have the ability for readers to pick a specific post by category.

Optionally, a way to figure out how to conditionally display a sidebar widget depending on category ID would be great. That way, I could list posts by category on the sidebar of category pages, and that would work.

(ps. I'm a fan and contributor... :-)
  #6  
Old Aug 16, 2009, 05:42 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The code of gjchandler should work. I'd use it without the opening and closing <LI>'s

<ul><?php
global $post;
$myposts = get_posts('numberposts=5&category=4');
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>

You can put this into the text areas in the theme options such as Style & edit HEADER AREA -> Configure Header Area

To conditionally display widgets use the Widget Logic plugin http://wordpress.org/extend/plugins/widget-logic/

Bookmarks

Tags
category bar menu, category menu, category-page, dropdown menu, posts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing category order in category menu bar, not in sidebar cat. list paulae Page & Category Menu Bars 13 Mar 30, 2011 06:36 PM
Show sticky posts in category pages c32v Atahualpa 3 Wordpress theme 3 Dec 12, 2010 09:37 AM
Show Child Category In Category Menu Bar? mwsmedia Page & Category Menu Bars 1 Jun 29, 2009 06:06 AM
[SOLVED] Category menu: show empty categories perdox808 Page & Category Menu Bars 2 Apr 8, 2009 10:59 PM
adding space between rotating header and category dropdown menu smkpbk Header configuration & styling 1 Feb 24, 2009 08:24 AM


All times are GMT -6. The time now is 04:28 PM.


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