Well it seems to me like a basic php question: This function works very well to add category posts to specific pages while still displaying the page content above.
But I want this function to only be loaded on three specific pages. On all other pages it should not be called, otherwise it produces a second identical loop.
I tried some "if (is_page(153) || (is_page(12) || (is_page(7)) {........}" things, but all if constructions lead to a blank white page...
please help, how do I wrap it into some "if" to get it work?
function kraeuter_page_loop() {
if (is_page(153)) {
query_posts("cat=9&showposts=10");
} elseif (is_page(12)) {
query_posts("cat=4&showposts=10");
} elseif (is_page(7)) {
query_posts("cat=3&showposts=10");
} else {}
/* Count the number of posts so we can insert a widgetized area */
$count = 1;
while ( have_posts() ) : the_post() ?>
<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
<b>CUSTOM CONTENT</b>
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php // thematic_content(); ?>
<?php
if (is_home() || is_front_page()) {
$content = 'full';
} elseif (is_single()) {
$content = 'full';
} elseif (is_page()) {
$content = 'full';
} elseif (is_tag()) {
$content = 'full';
} elseif (is_search()) {
$content = 'full';
} elseif (is_category()) {
$content = 'full';
} elseif (is_author()) {
$content = 'full';
} elseif (is_archive()) {
$content = 'full';
}
if ( strtolower($content) == 'full' ) {
$post = get_the_content(more_text());
$post = apply_filters('the_content', $post);
$post = str_replace(']]>', ']]>', $post);
} elseif ( strtolower($content) == 'excerpt') {
$post = get_the_excerpt();
} elseif ( strtolower($content) == 'none') {
} else {
$post = get_the_content(more_text());
$post = apply_filters('the_content', $post);
$post = str_replace(']]>', ']]>', $post);
}
echo apply_filters('thematic_post', $post);
?>
<?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
</div>
<?php thematic_postfooter(); ?>
</div><!-- .post -->
<?php comments_template();
if ($count==$thm_insert_position) {
get_sidebar('index-insert');
}
$count = $count + 1;
endwhile;
}
add_action('thematic_below_indexloop', 'kraeuter_page_loop');