Your cart is currently empty!
Homepage › Community Forums › Epik Theme Support › Portfolio Masonry
I’ve been having issues with the Epik portfolio masonry. I made the edits suggested in the forums and the problem is corrected. However I added code at the bottom of the responsive section in CSS. I could not locate (max-width: 580 px) in my Responsive section. I’d like to check that I entered the code in the correct place. The problem was corrected when I edited the php and added code in the CSS Portfolio section but I went ahead and added code in the Responsive section as well but could not locate the line Wes indicated to place the code under (max-width: 580 px). Should this raise any concerns?
____________________________ Forum topic reference below:
The second set of code goes in the responsive section under (max-width: 580px) around line 4263.
.portfolio-clear-2 {
clear: none;
}
I’m looking at your CSS file and it looks like you just added the last step/code at the bottom of the CSS when it should be inside of the Responsive Section of the CSS.
So once we add the code in those 2 spots it should be fixed.
Do you have a link to your site?
Porfolio page is titled “Our Work”.
@caroline I can login and check your portfolio file for you if you want. If so, it would be easier and safest to create a temporary FTP login to check/edit the file (to prevent mistakes or the site going down).
The same issue doesn’t happen on the demo, so I believe it’s due to the height of the portfolio items causing the issue when the browser is resized at a certain point. Either way we can still get it fixed.
Apparently I don’t have this added in the update, so I’ll make sure and have that part fixed in the update by the end of the day.
I tried to look at your portfolio php file but it wouldn’t let me access it since I don’t have admin privileges . I would need that in order for the files to show up.
By looking at the site itself I can see from the source code that part of the php code is either missing or isn’t working properly since the first .portfolio-clear
isn’t showing up.
I also don’t see it in the CSS, I just see the .portfolio-clear-2
at the moment.
Your last 2 replies did show up privately, so no one else will see it.
Ok just got it fixed. First I added this to your portfolio file right above the part that you edited –
// Outputs clearing div after every 2 posts
add_action( 'genesis_after_entry', 'portfolio_after_post_2' );
function portfolio_after_post_2() {
global $wp_query;
// Assumes 2 posts per row
$end_row = ( $wp_query->current_post + 1 ) / 2;
if ( ctype_digit( (string) $end_row ) ) {
echo '<div class="portfolio-clear"></div>';
}
}
^ That code adds clear: both
after the 2nd portfolio item when the site is being viewed on smaller devices. The issue was the 3rd portfolio item showing up off to the right, this code in addition to the css I added forces everything to clear after the 2nd post to prevent that from happening.
The CSS I added was this (in the portfolio section) –
.portfolio-clear {
clear: none;
}
.portfolio-clear-2 {
clear: both;
}
Then I added this in the responsive section (under the iPhones (portrait and landscape
max-width: 767px)
.portfolio-clear {
clear: both;
}
.portfolio-clear-2 {
clear: none;
}
Hit your reload button so it will clear your browser cache and view the site to make sure everything is working on your end.
Its working great! Thank you, Wes. I added more place card items to the portfolio page to test page 2 and it’s working fine as well. I also changed the # of listings from 10 to 12 in Genesis portfolio settings on the dashboard so the final row displays 4 across like the other rows instead of 2. I believe the default settings are 10.
Thank you again for your help!
Best,
Caroline
You’re Welcome!