kennethschultz
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Twenty Twelve] Custom Menu active link colorThanks Bernie
It worked ??
@andrew – i’m using a child-theme, so no need for the css-manager-plugin (unless it has some other features usefull for the ongoing work with the styling)
sincerely Kenneth
Hi alchymyth
The manually order I figured out – thanks.
Regarding my second question I think I’ll have to dive into the WordPress Codex and start reading, because i’m still trying to grasp the structure of the code you so kindly supplied. I’ve searched and read so many posts regarding this question without really understanding the different suggestions. So I’ll better take it from the very beginning.
But thanks a lot for your help.
sincerely Kenneth
Hi alchymyth
It worked perfectly! Thanks a lot.
Right now it shows the 6 different categories in alphabetical order.
If I also wanted to control that aspect. Either by the latest post first or in an order controlled by me, manually … Would that be possible?For now, thanks an awful lot for the solution I’ve searched for a loooong time ??
Sincerely Kenneth
Hi alchymyth
thanks – but unfortunately this is the kind of situation where my basic understanding of WordPress and the structure of the code is revealed.
I’m not quite sure how to combine your example with my code; what to leave out and what to keep.Right now my code for the page template looks like this
<?php /** * Template Name: Category TEST NEW * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php query_posts('cat=4,5,6,7,8,16&posts_per_page=6&orderby=date&order=DESC'); ?> <?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1> <?php $category_description = category_description(); if ( ! empty( $category_description ) ) echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); ?> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_footer(); ?>
The question is now where to add your code. I’m sorry for this dilettantish behaviour.
Sincerely Kenneth
Thanks alchymyth
But this raises another problem I’ve tried to solve for a long time.
How can I make sure that it ONLY shows the LATEST post form EACH category. There are 6 categories in total and it’s not certain that all of the different categories will be update simultaniously.
That means the code can’t look like this:
<?php query_posts('cat=4,5,6,7,8,16&posts_per_page=6&orderby=date&order=DESC'); ?>
What do I have to change?
Thanks a lot for the help.
sincerely Kenneth
Hello
Thanks for the response. But a matter a fact I (sort of) solved the problem myself before seeing these responses.
I dublicated the category.php file and made it into a page-template. Adding
<?php query_posts('cat=4'); ?>
just before
<?php if ( have_posts() ) : ?>
But – now I just want it to show the LATEST post from the specific category! And that solution I’ve not been able solve. Any ideas?
Sincerely Kenneth