Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #241854

    John H
    Participant

    I have a question about displaying text on the Portfolio list pages. This might be a more general WordPress question, but I’m stumped.

    I see on your samples of X that portfolio items have at least a caption below the image. I can’t figure out how to get any of that showing in our theme.

    I would like to show at least a Caption, if not a description or an excerpt. I’ve tried adding the excerpt to the Portfolio post in that area, but it doesn’t show up.

    I tried adding title/caption/description in Media Manager. None of this shows in in the Portfolio list pages.

    I’d like to be able to show a description or at least a caption on the list page.

    Thanks

    #241855

    John H
    Participant
    This reply has been marked as private.
    #241898

    Rue Nel
    Moderator

    Hello There,

    Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    Would you mind sharing with us which demo site you are referring for the titles, captions, descriptions and excerpts on portfolio pages?

    Thank you for understanding.

    #242331

    John H
    Participant

    I’m talking about the Title or Caption in Porfolio lists. My site does not show this, and I don’t know how to enable it. Also does X support the Excerpts function for Porfolio posts? Or the ability to show a description etc. in this area as well?

    Portfolio Captions

    #242332

    John H
    Participant
    This reply has been marked as private.
    #242391

    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Copy content-portfolio.php file from framework -> views -> icon and put it in the same path inside child theme, Now replace existing code with this:

    <?php
    
    // =============================================================================
    // VIEWS/ICON/CONTENT-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Portfolio post output for Icon.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-wrap">
        <div class="x-container max width">
    
          <?php if ( x_is_portfolio_item() ) : ?>
    
            <header class="entry-header">
              <h1 class="entry-title"><?php the_title(); ?></h1>
              <?php x_icon_entry_meta(); ?>
            </header>
    
          <?php endif; ?>
    
          <div class="entry-featured">
            <?php x_portfolio_item_featured_content(); ?>
    
              
          </div>
    
          <?php if ( is_singular() ) : ?>
    
            <?php x_get_view( 'global', '_content', 'the-content' ); ?>
            <div class="entry-extra">
              <?php x_portfolio_item_tags(); ?>
              <?php x_portfolio_item_project_link(); ?>
              <?php x_portfolio_item_social(); ?>
            </div>
            <?php else : ?>
              <h2 class="entry-title entry-title-portfolio">
              <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
            </h2>
          <?php endif; ?>
    
        </div>
      </div>
    </article>

    Hope that helps.

    #245037

    John H
    Participant

    Ok thanks, yes this works. However the Title text is very large, looks like it’s taking formatting from the title on the actual portfolio post page? What is the name of the CSS tag that I can format in Customizer>Custom?

    #245199

    Rue Nel
    Moderator

    Hello There,

    To change the font size of the portfolio title, please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .page-template-template-layout-portfolio .entry-title-portfolio {
        font-size: 20px;
        padding-top: 5px;
        text-align: center;
    }

    Please let us know how it goes.

    #359692

    vaughnmercury
    Participant
    This reply has been marked as private.
    #359698

    Christopher
    Moderator

    Hi there,

    You can control excerpt length under Customize -> Blog.

    Thanks.

    #373852

    tekgeek88
    Participant

    Just wanted to say that I watched the video on child-theme to get a decent understanding.
    Followed this thread to a ‘T’ and everything worked like a charm.

    Thanks a lot guys!

    #373940

    Rue Nel
    Moderator

    Hey There,

    You’re welcome!
    Thanks for letting us know that it has worked for you.
    We are glad this topic were able to help you out.

    If there’s anything else, we can help you with, please let us know.