Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #4418

    Hi,

    would like some advise on how to change the archive layout (now displaying post excerpts in 2 columns) to the same layout used in the blog (displaying post excertps in one column)?

    Thanks in advance :)

    #46255

    Hey,

    in archive.php replace:

    get_template_part( 'includes/loop', 'archive' );

    with:

    get_template_part( 'includes/loop', 'index' );

    #46256

    Thanks for the quick reply – I applied the changes above but this shows all posts (not filtered by category), I’d like to change only the style to display in one column only if possible?

    Cheers

    #46257

    Are you sure? I tested it offline and it works for me. It would be very strange because both loop files use the same query code and you’d need to adjust the code to query all posts. Please check if you modified archive.php right.

    #46258

    Yep, just changed it back to double check and the posts aren’t being filtered by category, also the Heading text is aligned further to the left than with the blog format:

    http://www.marketeventsgroup.com.au/category/qld/

    on the page above all posts are coming up rather than just the QLD category… any further advise would be great

    From my archive.php:

    <?php

    global $avia_config;

    /*

    * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.

    */

    get_header();

    ?>

    <!– ####### MAIN CONTAINER ####### –>

    <div class=’container_wrap’ id=’main’>

    <div class=’container’>

    <div id=’template-archive’ class=’content grid9 first’>

    <h2 class=’firstheading’><?php echo avia_which_archive(); ?></h2>

    <?php

    /* Run the loop to output the posts.

    * If you want to overload this in a child theme then include a file

    * called loop-archive.php and that will be used instead.

    */

    get_template_part( ‘includes/loop’, ‘index’ );

    ?>

    <!–end content–>

    </div>

    <?php

    $avia_config = “blog”;

    //get the sidebar

    get_sidebar();

    ?>

    </div><!–end container–>

    </div>

    <!– ####### END MAIN CONTAINER ####### –>

    <?php get_footer(); ?>

    #46259

    Can you create me an admin account and send me the login details to: (Email address hidden if logged out) – I’ll look into it :)

    #46260

    Have just emailed you the details, thanks!

    #46261

    Hey,

    fixed it. The orderby=ASC parameter broke the query and all posts appeared :)

    #46262

    Thanks for the fix – looks great!! Is there any other way I can force the posts to be listed in ascending order other thamn where I’d applied the orderby=ASC parametre? As I’m using the blog for event entries (am forward dating the published dates to appear as the event date) I’d like to have the posts published in chronological order so the next event appears at the top. I’ve tried a few plugins but they don’t seem to work (I;’ve used Asticky post orderer on other themes but I’ve found that in this instance the sticky option works but when I order the posts the sequence doesn;’t change).

    Any advice would be greatly appreciated – thanks again!

    #46263

    1) Make a copy of loop-index.php

    2) Rename the copy to loop-archivebig.php

    In archive.php replace:

    get_template_part( 'includes/loop', 'index' );

    with:

    get_template_part( 'includes/loop', 'archivebig' );

    3) Open up includes/loop-archivebig.php and replace:

    if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }

    with:

    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['order'] = "ASC";
    $avia_config['new_query']['orderby'] = "title";
    query_posts($avia_config['new_query']);
    }

    #46264

    Hey, thanks for this – tried the above modifications but still no luck with displaying the posts in ascending order. I appreciate all the help so far, if you could take another look I’d be very greatful :)

    cheers

    #46265

    Update – with the above both the blog page and archive pages didn’t display posts in ascending order, I’ve had a play around with it and inserted this: (loop-index.php)

    if(isset($avia_config)) {

    $avia_config = “ASC”;

    $avia_config = “date”;

    query_posts($avia_config);

    }

    in place of:

    if(isset($avia_config)) { query_posts($avia_config); }

    if(isset($avia_config)) {

    This works and sorts the posts in the blog page in asc date order and doesn’t cause problems with the categories not being filtered in the archive pages as with the previous code I’d used:

    query_posts($query_string.”&order=ASC”);

    if (have_posts()) :

    but still can’t get the posts in the archives to be displayed in ascending date order?

    #46266

    Try to make the same modification in loop-archivebig.php

    #46267

    Yep, have copied the modification but still no joy?

    #46268

    Can you create me an admin account and send me the login details to: (Email address hidden if logged out) – the last account doesn’t seem to work anymore.

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Edit Archive layout to displayed like blog layout – Broadscope’ is closed to new replies.