Problems with Portfolio page and individual portfolio items views

I have a new problem on my portfolio page and then on viewing individual portfolio items

  • Portfolio page: the filtering menu at the top of the list will no longer display. I have the page template set to layout-portfolio and this code in the global css but the filtering menu still won’t display. How it looks now on my site.

x-portfolio-filters-menu{
display:block !important;
}

  • When viewing individual portfolio items I want them to display full width but also be able to display any sidebar alongside the portfolio image and content (basically like a blog post would display). It was working for a while and then a new update of X broke it and I can’t figure out how to make this work again. I’m using this code to wrap the portfolio post to display in the center like a blog post. How it looks now on my site.

.single-x-portfolio .entry-featured,.single-x-portfolio .entry-wrap {
width: 100%;
}

Hi There,

When I checked the site, the filter code is not even there. So the code you have added will not work either way because the structure for the filter is missing. Please make sure that on Portfolio Page Settings > Disable Filtering is not checked. If it is already not checked, maybe we are seeing a cache content. Please do clear cache if you do have caching plugin.

I also noticed that your content is cutoff on top part of the pages. To avoid this, please go to Theme Options > Header > Navbar Top Height: Increase current value.

Regarding single post portfolio page, that CSS you have shared is still working, currently fullwidth. can you give us screenshot on how you want it? Please note that for the sidebar to show, we have to set it on global settings on Theme Options > Layout and Design: Content Layout: Choose template with sidebar.

I did have “disable filtering” checked. I’ve had this problem for about 6 months and I keep trying different things to get it working; mostly stupid things out of frustration. But, other than last night when you looked :thinking: I always have filtering turned on and it still doesn’t work. I turned it back on and… no joy. I also changed the Navbar Top Height to 60, but still not seeing the filtering option at the top of http://intentionallylost.com/photo-collections/

I believe that url is being treated as an archive rather than a top level page so something must be overriding the portfolio layout and functions on that page. That happens to me a lot so I’m sure it something I’m doing wrong.

For single post portfolio page:
My global content layout is set to content left, sidebar right. It displays correctly on blog posts but not on the single portfolio posts. I want it to look like this.

Hi There,

If you think it is being treated as archive page, please try renaming the other category or tag that is using the same slug. Please note that by default slug should always be unique, Page, post, category or tags or any slug should be unique. After renaming the slug, make sure to save permalinks before checking again.\

Thank you for the clarification on the portfolio. Regular sidebar content doesn’t display on portfolio single post page on Ethos. By default, featured image is on the left with 68% width and the content is 32% on the right. We can see the default template content on content-portfolio.php on this folder: wp-content\themes\x\framework\views\ethos. To change it and display like blog post, please copy the same file on the same folder on your child theme and update the template.

There is no other category, page or post using the same slug. Any other ideas I can try?

The way that portfolio posts are meant to display in Ethos just doesn’t make any sense for me, but I still want to keep portfolio posts separate from normal blog posts. I copied content-portfolio.php into the same location in my child folder but I don’t know what you mean by “update the template”.

Hi There,

In that case, would you mind providing us with login credentials so we can take a closer look on portfolio page settings? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password

About single portfolio page, what I meant was, feel free to edit the template as needed. You may check this file as guide:
wp-content\themes\x\framework\views\ethos\wp-index.php for sidebar

I shared a login so you can take a look at the portfolio settings.

It was only about six months a go that I had the single portfolio posts displaying with a sidebar by only adding some simple css code so I was hoping that was still a possibility. Perhaps an update of X theme or WP invalidated what was working well though. I’ll take a look at modifying the php files.

Hi There,

The credentials is incorrect. Please double check.

Hello, I know it’s been forever since I followed up on this thread. I’m seeing the issue again on my individual portfolio posts. I want them to show up like a blog post with content left - sidebar right like this.

Instead they look like this with the sidebar below all of the content.

I did follow the instructions to copy the content-portfolio.php to my child theme folder. That isn’t making any difference in the single portfolio post display though. Can you help me edit the template?

Hi There @kevinwenning

Because of the way you have customized, the sidebar is outside of the main content area div.

As a workaround, try adding the following CSS rule into your X -> Theme Options -> CSS area and see if that helps.

.single-x-portfolio .x-container .offset.cf {
    max-width: 74%;
    float: left;
}

If that doesn’t work, we need your FTP credentials to check your child theme customizations.

In the meantime, please make sure to purge all cache before testing (refer: https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/).

Thanks!

That CSS worked but it doesn’t exactly look great as there’s a giant white margin between the portfolio post content and the sidebar. I can live with it if that’s the best solution but I’d rather make it consistent with the way blog posts display.

How can I get that sidebar back inside the main content div in the child theme php?

Interesting, but I don’t know if this is related. I see this error at the bottom of the screen when I view a single portfolio post. I don’t see this error on any other pages. See this page as an example https://intentionallylost.com/photo-collections/snowy-pasture/

Fatal error: Uncaught Error: Call to undefined function x_ethos_main_content_class() in /home/kevinwen/public_html/wp-content/themes/x-child/single-x-portfolio.php:19 Stack trace: #0 /home/kevinwen/public_html/wp-includes/template-loader.php(74): include() #1 /home/kevinwen/public_html/wp-blog-header.php(19): require_once(’/home/kevinwen/…’) #2 /home/kevinwen/public_html/index.php(17): require(’/home/kevinwen/…’) #3 {main} thrown in /home/kevinwen/public_html/wp-content/themes/x-child/single-x-portfolio.php on line 19

Hi Kevin,

Looks like your child theme contains custom templates that aren’t compatible with the latest version. There is no function named x_ethos_main_content_class anymore. So please edit your custom templates and replace the x_ethos_main_content_class with x_main_content_class.

Thanks!

Are you responding to my question about the large white margin between portfolio post content and sidebar or about the “fatal error”? I just wanted to know if they’re related. If they’re not then I’ll put the fatal error issue on a different thread.

Also, I don’t exactly know what “edit your custom templates” means. I had someone do work on the site a while back and they added custom CSS in a few places. I probably can go rip that out now as I no longer use what they did for me. Would custom sitewide CSS override the default templates?

Hi Kevin,

Sorry for the confusion, I thought you were saying about the margin caused by the internal error. But yes, my last reply was about the internal server error. And about the margin, please add this CSS as well

.single-x-portfolio .x-container .offset.cf .x-main.left {
width: 100% !important;
}

Thanks!

At least for now, I’ve got both of those issues fixed thanks to the latest replies from @Rad
I don’t see anywhere to close the thread but I’m fixed for now. Thank you!

You’re welcome!