mymommysplace
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: Posts won't display in categoriesFigured it out! The problem was a category visibility plugin.
Forum: Fixing WordPress
In reply to: On a single post page, content is showing up twice.Once again, after hours and hours of head-banging, I figured it out.
Here was the problem:
<?php $post = $wp_query->post; if ( in_category('ohsays') ) { include(TEMPLATEPATH . '/single1.php'); } if ( in_category('ohcares') ) { include(TEMPLATEPATH . '/single3.php'); } if ( in_category('ohwow') ) { include(TEMPLATEPATH . '/single4.php'); } else { include(TEMPLATEPATH . '/single2.php'); } ?>should have been:
<?php $post = $wp_query->post; if ( in_category('ohsays') ) { include(TEMPLATEPATH . '/single1.php'); } elseif ( in_category('ohcares') ) { include(TEMPLATEPATH . '/single3.php'); } elseif ( in_category('ohwow') ) { include(TEMPLATEPATH . '/single4.php'); } else { include(TEMPLATEPATH . '/single2.php'); } ?>Daggone “else.”
Forum: Fixing WordPress
In reply to: Comments not showing on single post page!I was able to resolve the problem myself. Instead of using this
<div class="comments-template"> <?php $post = $wp_query->post; if (in_category( array( 3,9 ) )) { include(TEMPLATEPATH . '/comments2.php'); } else { include(TEMPLATEPATH . '/comments.php'); } ?> </div>to call different comment templates, I made different single.php files that called the appropriate comment.php.
Perhaps I used too many conditional tags? I don’t know, but it’s doing what I want now.
Viewing 3 replies - 1 through 3 (of 3 total)