This is a very broad subject, but if you are saying that you have used a theme on one WP installation and it works, and the same theme on a second independent WP installation and it doesn’t work, without any changes to the code, then how you read your incoming data would appear to be the issue.
Are you sure that there is no issue with the single page? Sometimes the code may be the same, but has a built in the error as often only one set of testing data is used.
Check the theme source, and try testing with the WP test data
Thanks data for your response.
I created two similar themes which differ in aesthetics but contain the same codex. However, one theme does not function correctly when opening a single page and a page. I am using it on one WP installation.
Would you mind elaborating on “a built in the error as often only one set of testing data is used.”
I’ve searched through out the forumn/internet to find a solution and nothing has really helped so far. I have yet to try the WP test data and will do that asap. If you have any other recommendations i would appreciate it.
Once again thanks for responding!
Would you mind elaborating on “a built in the error as often only one set of testing data is used.”
As I read the initial post I thought you had two different installations of WP running the same software, that is two identical themes on two web sites. I have found that when we take on older sites the code is often built to make the data that is already there work. For example what happens if A and B are passed to the code, the test model has A nd B so it works, but sometimes in the real world you can get A nd C passed to the code and it either fails, or more often comes up with some strange results. As I was wrong in my assumption and you are using exactly the same data it is a redundant remark.
Is it possible to let me have a URL so I can see the two different results? As this is your own code it is impossible to say look at line xx or the function Y isn’t working as could be the case in a more common theme such as twentyten (do you get the same problem if you switch to twentyten?).
To get the test data do a ‘Save As’ while hovering over the hyperlink and save the file off. Don’t do this on a live server as it will blow your current database to bits! Use the admin menu > tools > import to import it.
It would seem that if you have one set of data, and one set of code then it is how the code interprets that data that is the issue. Most single pages still run a loop so I would start around the <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
part of the single. You seem to be saying that the while loop stops after the one post has been loaded with one setup and not with the other.
These are the test criteria I would start with when trying to figure out what have I got and how could I have logically got them:-
Does the broken theme always start with the same post ID as the working one?
Does the broken theme always start at the first post and run up to the correct one?
Does the broken theme get the one correct post and a random selection of other posts that change if you refresh the site?
Building up a picture of what is wrong will often give you that flash of inspiration!