mollylovesmacs
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: sorting category posts differently (ascending order)I’ve just checked – you’re correct, the line of code is different (I’m just getting my ‘newbie’ head around PHP which might explain it!)
OK, (and just so that I can get my head around it) on my index.php page I had the following two lines of code:
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>I replaced both with:
<?php $posts=query_posts($query_string . '&order=asc'); if (have_posts()) : while (have_posts()) : the_post(); ?>Which gave me ascending post order.
On my archive.php page I only have the second (albeit identical) line of code as that on the original index.php page:
<?php while (have_posts()) : the_post(); ?>Don’t laugh, but I thought that I could just replace this single line (as I did in the index.php page) with the same ascending order code. Obviously not. ;o)
The following appears to work (Hooray!) though I wonder if you could cast your expert eye over the syntax for me just to confirm.
<?php $posts=query_posts($query_string . '&order=asc'); while (have_posts()) : the_post(); ?>Thanks for taking the time; appreciated.
MollyForum: Fixing WordPress
In reply to: sorting category posts differently (ascending order)Hello Michael,
Thanks for the information.
I’ve had a read of the links you kindly provided and have found that the file I need to modify is indeed archive.php. I traced the identical line of code within archive.php as I had in the original (unmodified) index.php file:<?php while (have_posts()) : the_post(); ?>..and replaced this with the new code that gives me ascending post order in the blog page:
<?php $posts=query_posts($query_string . '&order=asc'); if (have_posts()) : while (have_posts()) : the_post(); ?>However, when I go to view the pages I get the following error:
Parse error: syntax error, unexpected $end in /home/walletsm/public_html/wp-content/themes/walletsmarts/archive.php on line 186
I would appreciate any further pointers you can give me.
Molly
Forum: Fixing WordPress
In reply to: Switching from temporary URL to live URLThank you for the clarification samboll.
I appreciate your help and the additional advice on image URL’s.Molly.