kitsuneyo
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: Strange CSS rules setting IDs and classes to display:noneI tried the site in Internet Explorer and now see the problem is only happening in Chrome. D’oh.
Edit – AdBlock Plus was to blame! Sorry!
Thanks! Removed an extraneous ‘)’ from the end of the 4th line and it works great.
Thanks for these answers!
alchymyth, you solved my problem. I knew it must be something like that, but I didn’t realise there was a difference between post types and post formats. Even though the get_post_format was in my code all along!
Digital Raindrops, thanks for the advice.
Here is my new code, which now works:
<?php while ( have_posts() ) : the_post(); ?> <?php global $post; $postvariable++; /* count the posts */ ?> <?php $format = get_post_format(); /* get the post format and hold it as a variable */ ?> <!-- If gallery or image, always display normally --> <?php if ( $format == "image") { get_template_part( 'content', get_post_format() ); } elseif ( $format == "gallery" ) { get_template_part( 'content', get_post_format() ); <!-- If most recent post, but not image or gallery, use content-mostrecent --> } elseif ($postvariable == 1) { get_template_part( 'content', 'mostrecent' ); <!-- Display everything else normallyIf gallery or image, always display normally --> } else { get_template_part( 'content', get_post_format() ); } ?> <?php endwhile; ?>
Forum: Themes and Templates
In reply to: Limiting Posts Page to one category in TwentyElevenI need pretty much exactly the same information, or a link to a good guide at least. Can anyone help?
Exactly what I was looking for, thank you!
I’ll try it later on ??
Viewing 5 replies - 1 through 5 (of 5 total)