Content block with text above portfolio in PRO

I would like to have an introduction text above the portfolio page, but I cannot find any possibility to add a content block on a portfolio page. I also tried it the other way around; I set up a ‘normal blank page’ and tried to add the portfolio with a shortcode or an element, but nothing works. Could you please help? It seems so obvious but I cannot find it anywhere in the PRO theme.

Hello @Maikel,

Thanks for writing in!

The portfolio does not have any option to add any custom content, be a shortcode or custom html. You can only do that by modifiying the layout page template. Assuming that you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/INTEGRITY/TEMPLATE-LAYOUT-PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Portfolio page output for Integrity.
// =============================================================================

get_header();

?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">

      <?php echo do_shortcode('[cs_gb id=123]'); ?>

      <?php x_get_view( 'global', '_portfolio' ); ?>

    </div>

    <?php get_sidebar(); ?>

  </div>

<?php get_footer(); ?>

where the [cs_gb id=123] is the Global Block shortcode. You can create a global block in Pro > Global Block.

3] Save the file named as template-layout-portfolio.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/framework/views/integrity/

You will have to create the folder path since it does not exist in the child theme yet. The example above assumes that you are using Integrity stack. If you are using a different stack, you will need to copy the code of the template-layout-portfolio.php file in ``wp-content/themes/pro/framework/views/{stack}/` and upload it to your child theme.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.