• In my Harmonic theme on the bottom of my portfolio project pages, instead of using the Previous and Next Posts navigation that are displayed, I would like to display all 4 other portfolio projects. I’m guessing it’s going to be changes in my inc/template-tags.php, but I’m not sure how to code it to display all my other portfolio projects instead of just previous and next projects.

Viewing 1 replies (of 1 total)
  • Hi @gregwun!

    The changes you’re trying to make require familiarity with PHP.

    In particular, you’ll need to make use of the WP_Query class. The following article gives a good introduction to this class and some guidance on how to use it to create pagination:

    https://callmenick.com/post/custom-wordpress-loop-with-pagination

    To get started, you could check out some other themes that displays portfolio projects, Sketch for example, to see how the achieve what you’re after.

    If you download Sketch and navigate to the portfolio-page.php file, you’ll find the code that pulls in all of the portfolio projects starting at if ( get_query_var( 'paged' ) ) ::

    https://themes.svn.www.ads-software.com/sketch/1.1.5/portfolio-page.php

    Instead of making changes to inc/template-tags.php, I recommend creating a child theme and starting fresh with a new portfolio page template.

    Let me know how you get on with that!

Viewing 1 replies (of 1 total)
  • The topic ‘How to display all other portfolio projects on bottom of portfolio pages’ is closed to new replies.