Possible Issues with PRO's Portfolio

Hi guys, i believe there’s an issue with the settings of your last version’s portfolio page.

When you change to “video”, in the media type, for example, you usually get a new field group where the video settings are displayed.

In here we noticed 2 things that are not working correctly:

  1. If you change to “video” from the default option and then you save the page and return to the page, the “video” page settings disappear and you have to select another option and then select video again in order to make it appear.

  2. when you have an embedded code say, from a youtube video, added in its related field, and you then select to show the “media” option under “Featured content”, you never really get the embedded video as the featured video.

Can you please check and let me know if any of them are expected behaviors or if they could be considered bugs?

I will leave you a recorded video and credentials so you can access and see for yourself.

By the way, i tried to disable all the plugins to exclude a possible conflict and the problem was still there so i’m now wondering if i could’ve misconfigured this or if its just an expected behavior from the theme.

Thanks in advance for the support.

Hello FranticApe,

Thank your for the very detailed post information.

You have missed this note:

Note: will always use “Thumbnail” in Ethos due to Stack styling.

The video will only display in Integrity, Renew and Icon. No video display in Ethos stack.

For more details about the Portfolios, please check out this documentation:

Hope this helps.

Hm, I see, thanks for that info!

Is there a way to make this possible with ethos as well? I suppose it would require custom development and that would be alright, would you mind pointing me in the right direction? Maybe by telling me in which files do I find the code that shows the videos in the other stacks?

I basically want to show the videos with a styling like the one ethos has.

Then, what about the video settings that disappear? Is that also an expected behavior?

Hi @elpanda13,

I tested the video type portfolio item on your site and I’m not able to replicate the issue. I created a new portfolio item in your setup and selected the Video media type, entered the embed code in the video settings field then published the post. The video settings metabox didn’t disappear. I reloaded the post too but it was still there.

Same is the case in my local installation the video settings metabox is working as expected.

Yes that’s correct, displaying a video instead of a thumbnail in Ethos stack requires custom development as this is not a theme feature by default and is outside of our support scope, but we will do our best to help you getting started with the customization but we will not be able to implement it. If your child theme is setup then add the following code in your functions.php file of your child theme:

// Entry Cover
// =============================================================================

if ( ! function_exists( 'x_ethos_entry_cover' ) ) :
  function x_ethos_entry_cover( $location ) {

    if ( $location == 'main-content' ) { ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="entry-featured custom-portfolio-item">
			<a class="" href="<?php the_permalink(); ?>">
				<?php x_portfolio_item_featured_content(); ?>
				<h2 class="x-h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2>
			</a>
		</div>
      </article>

    <?php } elseif ( $location == 'post-carousel' ) { ?>

      <?php GLOBAL $post_carousel_entry_id; ?>

      <article <?php post_class(); ?>>
        <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
          <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2>
          <div class="x-post-carousel-meta">
            <span class="entry-cover-author"><?php echo get_the_author(); ?></span>
            <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
            <span class="entry-cover-date"><?php echo get_the_date( 'F j, Y' ); ?></span>
          </div>
        </a>
      </article>

    <?php }

  }
endif;

Then add the following code n the Theme Options > CSS:

.x-h-entry-cover {
    padding: 0;
    margin: 0;
    position: absolute;
    width: 100%;
    bottom: 0;
    font-size: 14px;
    left: 0;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    -webkit-transition: all 0.615s cubic-bezier(0.19, 1, 0.22, 1);
    transition: all 0.615s cubic-bezier(0.19, 1, 0.22, 1);
}
.custom-portfolio-item .entry-thumb {
    padding: 0
}
.custom-portfolio-item img {
    width: 100%
}

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Hope this helps!

Can you please let me know what is that php code supposed to do because i tried it and nothing changed on my end.

Could it be a that a filter or something else is needed?

Hey @elpanda13,

The above function will display the video instead of a thumbnail on archive page for Ethos stack. To make it work, you need to create a new page and set the page template to Layout - Portfolio. I went ahead and created a new page Portfolio in your site and changed the page template to Layout - Portfolio and the archive page started to display the video instead of the thumbnail for the video media type posts. I’m sharing the test page URL in a secure note so you can take a look.

I also made some adjustments in the CSS, I’ve updated it in my previous reply as well. Hope this helps!

Ah i see, i see, ok, well, that’s not really what i was looking for hehe.

I wanted to keep the same styling of the ethos stack archive (so inline) but show the video as thumbnail.

I actually wanted to know where is the code that checks whether you’re using a video or a featured image and show that, so i could study the code and create my own in a different child template for the ethos archive and make it work :slight_smile:

At first i thought it was the content_portfolio.php file in the integrity views but it seems there’s something else added.

You see, i don’t really want to have the archive page as a grid, and instead i want to show it normally, as a 2 column page where the left one is a featured video and the right one the title and content of the page.

Again, i do know that this is custom development, and in fact i don’t need you to give me the code, i just want to know the files i’d need to check so i can see if this is possible and how.

I hope i explained myself better this time.

Hey @elpanda13,

For this:

The template part that you need is a function. It’s the x_featured_portfolio function which you can find in x/pro > framework > functions > frontend > featured.php.

content_portfolio.php is a starting point. If you open that file, you see the x_portfolio_item_featured_content and that function resides in the file directory I mentioned above. That function then uses x_featured_portfolio.

content_portfolio.php is the one you need to modify to split the featured media and the content to 2 columns. So the Portfolio Template won’t show a grid, make sure it’s set to 1 column layout.

I believe that you understand that we can’t detail how exactly to do that as that requires custom development.

Hope that helps and thank you for understanding.

Thanks, i’ll give it a try and let you know how it went!

Well, it was easier to just style the integrity stack portfolio and archive pages as the ethos one than making all the different changes,

Th only thing i’m missing now is the videos, to me they just don’t appear at all. what are the requirements for them to appear?

i have added the video embed (youtube), then set the video settings to show the media and not the thumbnail, then selected 16:9 as the ratio and saved it.

I guess i must’ve changed something because it indeed worked.

Can you please check and let me know what am i missing (there’s a menu item “media -> videos” where you can see them all)?

thanks.

Hey @elpanda13,

The Menu > Videos pages are using the generic archive template and that does not support videos for the portfolio. You will need to use the Portfolio page template and then set the Portfolio Item Featured Content to Media in order to display the video in the portfolio listing page (portfolio page template).

The Portfolio page template is the one you then need to style so that the video is on the left.

Hope that helps.

could you please tell me how i do that? the page is actually the built-in portfolio settings created by themeco not a custom page or anything, so i supposed it was already using the correct archive.

How can i change it if that’s not even a setting that i can see from over here?

Hello FranticApe,

Please go to Pages > New Page. Create a page entitled “Videos”. Use the Layout - Portfolio page template. In the Portfolio page settings, select the Video category so that only the video portfolio items will display. And then you will also need to edit each of the portfolio items to make sure that Video is selected and not the default Thumbs as indicated by Christian.

I went ahead and logged in to your site. I edited your Videos page and the portfolio items.

Please check the url in the secure note.

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