Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Lorenz2525

    (@lorenz2525)

    Interesting. I needed a sub menu, so I installed the gecka submenu plugin. And there instead of displaying nothing it repeats the top main navigation. So somewhere in the last in the query has to be a check to prevent a double output of the same menu. But now it’s still the wrong menu…

    Thread Starter Lorenz2525

    (@lorenz2525)

    OK, I’ve tracked down the source of this. It’s somewhere in the query of get_posts() which is called by wp_get_nav_menu_items(). But messing around with that function got me another headache: Why can there be 8 posts if I allow sticky posts, when I limited the count on 5? Of course only on the category site. :S
    I’m officially clueless. This works on every other page, but in the category archive I get exactly 8 other posts than the two specified:

    function get_posts($args = null) {
    	$defaults = array(
    
    	);
    
    	$r = wp_parse_args( $args, $defaults );
    
    	if ( ! empty($r['include']) ) {
    
    		$r['posts_per_page'] = 2;  // only the number of posts included
    		$r['post__in'] = wp_parse_id_list( '442, 427' );
    	} 
    
    	$get_posts = new WP_Query;
    	return $get_posts->query($r);
    
    }

    Thread Starter Lorenz2525

    (@lorenz2525)

    OK, a new week a new view. It’s not the archive, but the category template where it won’t show up. Archive is fine. So I thought, but now I see it doesn’t matter which template. The content of the category archive is the problem, but I don’t know why, as my menu links go to pages.

Viewing 3 replies - 1 through 3 (of 3 total)