• Hello!

    To change order of decreasing I did everything according to the instructions:

    Once your child theme is in place and activated, you’ll want to copy the parent theme’s content-portfolio-archive.php file into your child theme, and edit that copy in your favorite editor.
    Just before the line that says while ( have_posts() ), add this line to the code:

    <?php query_posts('post_type=jetpack-portfolio&order=ASC'); ?>

    Print Screen
    But all remained still. Where I made a mistake?

    Thanks!

    • This topic was modified 9 years, 5 months ago by Podokonnik.
    • This topic was modified 9 years, 5 months ago by Podokonnik.
    • This topic was modified 9 years, 5 months ago by Podokonnik.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @podokonnik

    The code you’ve pasted in is from your other thread where you were trying to re-order your portfolio projects. archive.php is a little different.

    In your child theme’s archive.php, you don’t want to reference a specific post type (like jetpack-portfolio). Try placing this code just before while while ( have_posts() ) : the_post();

    Note – you want while, not if. This file contains both, and the one you want is down near the bottom 🙂

    <?php query_posts('order=ASC'); ?>

    Let me know how that turns out

    Thread Starter Podokonnik

    (@podokonnik)

    Sorry, but now I do not understand what have to do.
    Maybe you can describe the procedure that I need to accomplish, in a simpler version? Step by step.

    Thank you, very much

    Thread Starter Podokonnik

    (@podokonnik)

    I insert new code, but nothing changes
    Sreen

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Child Theme. Problem change Archive.php’ is closed to new replies.