Rob Cubbon
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesno problem
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesThanks, overdeath, that returns the latest blog post no matter which blog post is clicked.
I’ve just downloaded the whole theme and have it on my computer with XAMPP and it’s behaving the same way. I’ve just substituted a single.php from another theme that works into this theme and it still returns all the posts when a single post is clicked on.
It sort of proves that there’s nothing wrong with single.php and yet it’s making the wrong query.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesNo need to say sorry. Thanks for trying so hard. I’ll go back to code I know that works and try that way. Are we sure there must be an error somewhere with single.php and archive.php?
I don’t think there’s anything unique about the directory structure it’s just a WordPress install on the route.
Also, I just had a brainwave. When I first did the site it didn’t have a blog. So I’d just created a static home page and didn’t bother setting a blog page. And then later, after I’d created some posts, I created a “Blog” page and set that to display latest blog posts. So I thought that that might have something to do with it so I’ve just deleted the three blog posts and re-created them but the same thing’s happening.
Thanks again, vtxyzzy, for all your help.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesI had already tried the plugins and the problem remains. It’s only Headspace 2, Google Sitemap Generator and Contact Form 7. The functions.php is only:
<?php if ( function_exists('register_sidebar') ) register_sidebar(); ?>I have tried the homepage to be latest blog posts rather than static front page and the problem still persists.
I could have done something really stupid in the back end. Please bear in mind I’m really not very bright.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesSELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 5thanks
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesNo this theme I’ve cobbled together from what you’re left with when you’ve gone through this tutorial http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/ which is pretty bare bones.
I’ve used this on several websites – I’ve just been comparing the single.php with another site I’ve done which works and they’re exactly the same.
Thanks for offering though. I can zip this theme up and put it somewhere if you’re interested?
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesIt works fine with the default theme and I’ve just done a re-install and it hasn’t changed anything.
So I must have made a mistake with this theme. Is there any other file that could cause this to happen other than index.php, single.php or archive.php ?
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesI’ve done this (I’ve put
<!-- single.php -->just before<div id="container">in single.php and put<!-- archive.php -->just before<div id="container">in archive.php) and they show up where you’d expect them to.And I put the pretty permalinks back.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesNo, it’s not that. I’ve left them at default so you can see.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesHere is index.php: http://wordpress.pastebin.com/TeJhZGin
Please let me know if anyone wants any other code.
Forum: Fixing WordPress
In reply to: single.php displays all posts, archive.php displays all categoriesPoint taken, thanks, vtxyzzy.
Here is single.php: http://wordpress.pastebin.com/u66GrmFz
Here is archive.php: http://wordpress.pastebin.com/iZwrrJmk
Forum: Fixing WordPress
In reply to: Page 2 of blog is exactly the same as firstYes, I see that now. Thank you. I think I will hack out a solution now (I’ll put a direct link to page 2 of the category at the bottom of the index page as there’s only one category) and I’ll have another look at PHP later – and I’ll try to do learn PHP properly from the bottom up rather than pasting things in from all over the place and then wondering why it doesn’t work.
Thanks for your help.
Forum: Fixing WordPress
In reply to: Page 2 of blog is exactly the same as firstHi poil11, thank you for taking the time to offer solutions. As I’ve said, I don’t really get PHP yet so I apologise in advance for anything stupid I’m about to say…
I tried the first option and all I got was no posts at all just “next page”.
I tried the second option and completely pasted in your re-written index.php. Firstly I got an unexpected < on line 33 so I deleted that line completely – “<?php // if not first post show it like this” and I got the oldest 7 posts and then no right sidebar and no footer.
I need to do some learning at php.net and w3c schools.
Is there a resource that can tell you – “if it’s the first post do this; if it’s the second post do this; if it;s the second page do this” etc.?Forum: Plugins
In reply to: [Plugin: Contact Form 7] Print form resultsThank you, Micah, I’ve thought of that but unfortunately some ability to print the finished form has been requested.
And thank you for telling me about bumping. I somehow knew it was wrong which is why I’d hesitated in the past. I won’t do it again – I’ve got so much out of WP, the least I can do is follow their forum rules 🙂
Forum: Plugins
In reply to: [Plugin: Contact Form 7] Print form resultsI’ve seen people when they don’t have an answer on here go “bump”. So, bump!