How can I add text above the portfolio? (I've tried following old advice)

Hi I’ve been advised to add some text above our portfolio menu (not individual post) to improve SEO etc etc…

What is currently the correct method to add text above the list of portfolio items.

I’ve seen posts suggesting you add code to a file copied out to your child theme and others suggesting a JS file.

Neither approach has worked.

Hello @draper3000,

Thanks for writing in!

To accomplish what you have in mind, you will need to modify the portfolio page template and add it in your child theme. Please do the following:

  • Copy the file template-layout-full-width.php from your parent theme wp-content/themex/pro/framework/views/{your-stack}/template-layout-full-width.php
  • And then upload this file into your child theme’s folder in wp-content/themex/pro-child/framework/views/{your-stack}/template-layout-full-width.php
  • Edit the file and add your custom contents.

For example, you are using Integrity as the stack.

  • Copy the file template-layout-full-width.php from your parent theme wp-content/themex/pro/framework/views/integrity/template-layout-portfolio.php
  • And then upload this file into your child theme’s folder in wp-content/themex/pro-child/framework/views/integrity/template-layout-portfolio.php
  • The contents of the file might be this:
<?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">


      <div class="custom-content">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer scelerisque eros eu pulvinar dictum. Nunc egestas massa at elit bibendum, cursus fringilla nunc faucibus. Proin dignissim efficitur nunc a cursus. In luctus mi in nisi condimentum, sed ornare enim tempor. Praesent semper ultricies tellus, rutrum fermentum leo viverra at. Sed a venenatis ante, non aliquam tortor. Aliquam erat volutpat. Curabitur felis elit, rhoncus et molestie in, auctor euismod lorem. Etiam viverra hendrerit metus, vitae ullamcorper metus ultricies ut. Ut eu ex id ligula viverra auctor at quis urna.</p>
      </div>
      

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

    </div>

    <?php get_sidebar(); ?>

  </div>

<?php get_footer(); ?>

Hope this helps.

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