- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hey, Im really confused.
So I have multiple single.php templates and there are synced up to different category archive pages via the main single.php.
Thats all good and dandy. Im using this technique: http://elliotjaystocks.com/blog/tutorial-multiple-singlephp-templates-in-wordpress/
I ran into a problem, all the post the_title and the_content tags are grabbing the info from my fist post in its category.
ie I have 3 posts under the portfolio category, the first one looks right, but the last 2 posts are grabbing the title and content info from the first post… Everything else like the wp_title and the custom fields i have are all pulling from the appropriate post.
So whats the deal?? I’m cant figure this one out. Here is the single-blog.php file.
whoa there. So first you do this for your sidebar:
That line of code overwrites the "default" query for that page…. so it will always show cat 4 max posts = 10
You need to reset the "Loop" back to what it should be for that page. I believe this is the code for that:
Let me know if that does the trick
(another way to handle it is to have the sidebar list display after the main content (in the html), and use CSS to make sure it’s placed in the right spot.)
HOO-RAH! You are brilliant! I used the latter suggestion and it worked liked a charm. Thanks so much!
Excellent.
Did you try the <?php wp_reset_query(); ?> ?
I forget if that’s the right query…
Thanks,
I just tried it, both ways worked perfectly. i think this is the 2nd post of mine you answered in this forum. Thanks again!! :D
Excellent. You’re welcome.
Thanks for answering my post ;)