• So I have copied the actual loop.php page and used it for one of my custom templates but for some reason a simple <?php while ( have_posts() ) : the_post(); ?> won’t return any posts for the customized template even thou it works fine in the main one, if I put in certain conditions such as <?php query_posts( 'meta_key=price&orderby=meta_value&order=ASC' ); while ( have_posts() ) : the_post(); ?> then the posts start to appear, otherwise they won’t. Also the CSS gets buggy for the customized version, even thou the codes are exactly the same. I am quiet lost as to what could be causing this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you copy the full code of your index.php page into a pastebin please?

    if I put in certain conditions such as <?php query_posts( 'meta_key=price&orderby=meta_value&order=ASC' ); ?> then the posts start to appear

    that is right; this is how it works in page templates.

    the CSS gets buggy for the customized version

    the index page might be using some of the classes output by body_class() for the styling;

    please post a link to your site to illustrate the differences.

    Thread Starter orgzchaos

    (@orgzchaos)

    @steven Jones this is what index.php looks like and this is what loop.php looks like ( there is no loop-index.php ).

    @alchymyth Sorry but the site isn’t URL ready but you can find the relevant codes above and I can define the difference. Whenever I hover over a content box ( single post, featured image + excerpt ) it slides down and comes back to its place when the cursor is off it. No such thing when the main index is viewed.

    Thread Starter orgzchaos

    (@orgzchaos)

    Now I have the URL as well, you can see it at honeystolemymoney.com.

    Please notice how the post dividers shifts down and back up when hovered and removed in the lowest price page.

    I have tried multiple stuff to no avail, but then again I am not much of an expert.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom PHP index page won't work as expected’ is closed to new replies.