Portfolio Tag Description on Archive page for Ethos Stack

Hi There

I want to show the portfolio tag description beneath my tag on an archive page.

I saw this https://theme.co/apex/forums/topic/display-tag-and-category-descriptions/ but this seems outdated now / old as Ethos does not contain the suggested framework/views/renew/_landmark-header.php in my version?

Kind Regards

Hey @ragewebdesign,

The _landmark-header.php template file still exist. It’s in the legacy folder. Though it’s in that folder, the old template override is backwards compatible so you can copy that file into your child theme’s framework/views/ethos/

I will show you how to add the tag description but keep in mind that the Ethos landmark header was not designed to display other elements other that the tag archive title. I will show you how to output the tag description but you’ll need to do the styling as that would be quite involved.

Here’s the steps to output the description.

  1. Copy _landmark-header.php from the parent theme legacy/cranium/headers/views/ethos(or other stack)/ directory to your child theme’s framework/views/ethos/ directory.

  2. Look for this code

    <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?>

      <?php

      $meta  = x_get_taxonomy_meta();
      $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' );

      ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
      </header>

and this code under the h1 tag

        <p>
          <?php echo tag_description() ?>
        </p>

Like this:

You can now add content to your description.

Hope that helps.

Hi there

Thanks for this

This is exactly what I need in my stack.

<?php echo tag_description() ?>

But, when I added _landmark-header.php from the legacy files it had no affect what so ever on Ethos when I put it in there.

Hi,

In that case, can you provide us your site url so we can take a closer look.

Thanks

Hi Paul

I have solved this. It was the case that to test the edit I should edit the parent.

Now I see that working!

I have now made a child theme to repeat the edit and protect me moving forward! Thanks for your help!

Glad to hear that it is working now. Have a nice day! :slight_smile:

1 Like

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