Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

http://sandbox.thekrazycouponlady.com/style/

See page, getting 2 loops over each other.

If I use this query, I only get one article and I need ten, paginated:

$query = new WP_Query( 'post_type=page' );

But when I use this:

global $wp_query;

query_posts( array(
'post_type' => 'style',
'showposts' => 10,
'paged' => $paged)
);

I get 2 loops overlaying each other.

I inherited this project from another developer that botched everything together, so I'm trying to fix all of the issues.

Any help would be appreciated.

share|improve this question
Your WP_Query has post_type as 'page' and query_posts has post_type as 'style'... Which do you exactly want to loop over? – Rutwick Gangurde Oct 14 '11 at 3:57
it's supposed to be style. I have it correct, just posted it here wrong – Jason Oct 14 '11 at 13:33

closed as too localized by toscho Jul 18 '12 at 21:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

2 Answers

If fixing the appearance is good enough for you, add this to the bottom of one of the stylesheets:

.image_container, a.big-link, h2 a, .FA_wrap p {
float:left;
display:block;
height:auto;
width:100%;
clear:both;
}
share|improve this answer

WOW! What a mess.

Where should I start? First thing I noticed is you have 317 Errors (HTML) LINK TO W3C Validation Page. This would be my first task if I were you. A good way to troubleshoot the errors is to get a good text-editor like Notepad++. Then copy all the theme files in order and past them into a single .html file using Notepad++. This will allow you to see where the div's are starting and stopping.

The second thing I noticed is that the site is set-up using tables not div's. I didn't think anyone still used tables for site layout.

To be truthful, I would ditch the layout completely. You'll spend more time fixing that mess that just creating the theme from scratch. You could start with a theme frame like WHITEBOARD, then just adjust the css to fit your theme.

I don't know your skill level as far as customizing WordPress themes, but if you can fix that mess, you should have the ability to customize Whiteboard, or one similar to look like the current theme. If you run into any issues you can post the questions here and I'm sure you'll find some help.

share|improve this answer
It is a mess and full of tables, but it's what I'm stuck with. I wasn't the original developer and have been hired to just get it working.I would normally use studiopress genesis, but there's no time to redo the entire site (even though I have proposed this). – Jason Oct 14 '11 at 13:32
You can down-vote my answer but it is good advice. I wouldn't hand the site over in the condition it's in regardless of time. I've learned in in my lifetime in more than web design that I DON"T HAVE TIME TO DO IT THE RIGHT WAY= TWICE THE TIME DOING IT THE WRONG WAY. – Jeremy Jared Oct 14 '11 at 14:07
If you'll also notice that my answer points out that you have over 300 HTML errors. If you think you can fix that with a simple change to your PHP you're in for a surprise. Maybe you should re-read my advice on correcting the HTML issues. I didn't just criticize the design, I offered alternative suggestions. If you don't want to hear the answer, maybe you shouldn't ask the question!!! – Jeremy Jared Oct 14 '11 at 14:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.