Double content in post
-
I have my content show up twice in certain posts. You can see an example here http://www.smallbusinessdoer.com/business-plan-update-november-2010/.
I have set my site up so that all posts with the category “update” will have some extra text at the beginning of the post (as seen in the yellow box if you look at the link above).
I set that up by modifying my single.php file so that if it sees category number xx, it will use a certain single-name-of-category.php template file.
My original theory why I was getting the double content in the post was that I had somehow coded wrong and now I had somehow made the content loop twice.
However, I did this same method with the category “diy or go pro” which a post for can be found at http://www.smallbusinessdoer.com/corporation-kit-should-you-diy-or-hire-a-lawyer/ .
That is the exact same code in the custom single.php file, with the exception of the text between my <p></p> tags. I even copy and pasted the exact same code from the “diy or go pro” single.php custom file into the “update” single.php custom file and the posts for the updates still are double.
This is my single.php file.
<?php $post = $wp_query->post; if ( in_category('37') ) { include(TEMPLATEPATH . '/single-update.php'); } if ( in_category('55') ) { include(TEMPLATEPATH . '/single-diy-or-go-pro.php'); } else { include(TEMPLATEPATH . '/single-all.php'); } ?>
Any ideas of why this might be?
- The topic ‘Double content in post’ is closed to new replies.