Customizing the single Portfolio page layout

This tutorial goes over how to setup the single portfolio page layout in our WordPress theme. In this tutorial we will remove some unneeded code from our single portfolio page layout and add the Bootstrap grid classes. Steps Open the single-portfolio.php file and edit the code to look like the following:

Create a new […]

You need to have an active subscription to view this content.

Register Here!
  • oxygensmith

    To be consistent and to keep the directory structure clean, shouldn’t content-portfolio.php reside in the theme’s template-parts directory? If you did, then line 18 of ‘single-portfolio.php’ would then be

    … right?

    • You can put the file where ever you would like. The version of underscores that I use in the tutorials doesn’t have the templates-parts directory. But yes, you are correct.

    • Matthew Abraham

      Thanks man your comment was extremely helpful.

  • Thank you

  • Oluyomi Olufemi Kabiawu

    Hi Brad,

    For some reason my single page doesn’t display. It shows Page not found. The grid view does show but the single page doesn’t.

    • Maybe you have a PHP error somewhere in your markup. Do you have WP_DEBUG set to true in your wp-config.php file? That could give you some clues on what is going on with your theme.

      • Yomi

        Thanks Brad. I turned debug on but still saw no error. I however used Violet Asmus’ snippet ( changed ‘Primary’ to ‘menu-1’ in header.php ) and it now works for me.