a different approach: still puzzled
-
I’ve been trying to devise a method, in my new-to-php way, where my archives will show one post, and then list the rest (somewhere, anywhere on the same page) as titles and meta only.
latest effort was:
<?php /* If "news" category archive 2 */ if (is_category(2)) { ?>- <h2><?php _e('Recent News:'); ?></h2>
</hr>
-
<?php c2c_get_recent_posts_news(35); ?>
<?php /* If Booking category archive 4 */ if (is_category(4)) { ?>
- <h2><?php _e('Recent Bookings:'); ?></h2>
</hr>
-
<?php c2c_get_recent_posts_booking(35); ?>
and with only one of these inserted, it works! the plug calls 35 of the recent posts, and the sidebar displays them just right.
however, then when i add the second (and i was hoping to have 4 total) it breaks and gives me an unexpected T_IF (or T_ELSEIF if i use that.)
here’s what i did:
I duplicated the function c2c_get_recent_posts in Scott’s custom posts plugin, and specified the category for each instance, and named them accordingly.
both work, just not together.
So i suspect it’s the `if (is category(X)) that’s going bonkers.
how can i call multiple copies of this plugin using different categories?
or, is there an easier way to get recent posts by category into my archive side bar on a cat by cat basis?
man this is rough… nothing’s working.
- The topic ‘a different approach: still puzzled’ is closed to new replies.