-
AuthorPosts
-
November 19, 2014 at 8:01 pm #353927
Is it possible choose to exclude/skip the first, or whatever chosen number, of posts in a portfolio grid? I’m trying to create a single-post featured area that shows only that latest video above a regular portfolio grid, but I don’t want the regular portfolio grid to show the same latest video. Even if there’s a hacky way to do it, that’s fine. Thanks!
November 19, 2014 at 11:49 pm #354042Hey dmoz!
Try using the blog posts shortcode instead and then select a custom taxonomy (portfolio entries) with it. Also in the settings set the offset to 1 and it should skip the first post. You can select the grid layout with the blog posts as well.
Cheers!
ElliottNovember 20, 2014 at 3:14 am #354107Hey Elliott,
Thanks for the reply! Works great!
One other quick question though: is it possible to have the blog grid posts act the same exact way as the portfolio grid (I guess, without custom CSS)?
Take a look at the site here, http://ianrigby.com. You’ll see the “Documentary” section has the blog grid posts, and the “Adventure” section beneath it is the portfolio grid. The blog grid images have rounded edges and large spaces between them, whereas the portfolio grid had the option of no space. Are these settings I can change in Enfold’s options for the blog posts grid? Thanks.
November 20, 2014 at 11:37 am #354210Hi!
Looks like you almost got it. Just modify the border radius modification, replace it with this:
.avia-content-slider .slide-image, .avia-content-slider .slide-image img { border-radius: 0px !Important; width: 100%; }
Cheers!
IsmaelNovember 21, 2014 at 3:12 am #354842Hey Ismael,
Thanks for looking into this for me. I’ve modified the border-radius and styled the posts to match the sections below, but now I’ve lost the responsiveness of every section. I haven’t even modified the other sections, but they’re not moving into a single stacked column anymore. Any ideas?
*****EDIT: I fixed the CSS that was causing the weird non-responsiveness, but still don’t know why it happened in the first place. Also, using the “blog posts” module, as you suggested, none of the posts in the blog posts grid are opening in a lightbox, as they were before in the portfolio grid, and as the rest of the videos do. What do you think is the problem?
- This reply was modified 10 years, 1 month ago by dmoz.
November 21, 2014 at 7:07 pm #355429Hi!
Try dragging a codeblock to your content and add this inside.
<script type = "text/javascript"> jQuery(document).ready(function(){ jQuery('.avia-content-slider .slide-image').attr('rel', 'lightbox'); jQuery('.avia-content-slider .slide-image').attr('href', jQuery('.avia-content-slider .slide-image img').attr('src') ); }); </script>
Cheers!
ElliottNovember 21, 2014 at 10:55 pm #355656Hey Elliott,
Ok, tried that. Now it opens the same video thumbnail, not the corresponding video, in a lightbox. I need the video to come up in a lightbox like the sections below that second “Documentary” one.
November 22, 2014 at 8:30 pm #356010Hi!
EDIT: File has expired.
And extract it into /enfold/config-templatebuilder/avia-shortcodes/ and the portfolio grid shortcode should now have an offset option.
Cheers!
Elliott- This reply was modified 10 years ago by Elliott.
November 23, 2014 at 2:42 am #356071I tried that and the blog grid posts still only open an image in a lightbox. I’m not sure what the offset option is, but I just need the blog post grid items to open their video in a lightbox like the other portfolio grid sections. Can this be fixed?
This is now very urgent as this is a live site!
November 23, 2014 at 2:41 pm #356220Hi!
I’m sorry but blog posts doesn’t have this feature by default. If you want them to open the video on lightbox, edit the post then set the post format to link. Add the url of the video on the text editor. If you’re worried about the excerpt, click Screen Options then enable the Excerpt meta box. Add the excerpt there.
Regards,
IsmaelNovember 23, 2014 at 11:12 pm #356379I’m not using blog posts. I’m using a blog grid to pull portfolio items because I was told that only the blog grid can exclude a first post, right?
**EDIT** Also, it seems that excluding the first post of the blog grid section (the “documentary” category on my site) also excludes the first post in any “documentary” feed on the page. I added a “Recent” section that should pull the newest published portfolio item in any category, but it’s skipping the actual first one because it’s in the documentary category. This is clearly a bug. Are you able to fix?
**EDIT 2** Now I’m seeing that portfolio grids can, in fact, skip a set number of posts. My problem now, though, is when I use all portfolio grids, without skipping any posts yet, my most recent portfolio items are no longer showing in the “Recent” section (which is set up to pull the one most recent portfolio item from any category).
- This reply was modified 10 years ago by dmoz.
November 23, 2014 at 11:55 pm #356390Honestly, I don’t know what’s going on with the theme now. I have everything set up, but certain videos aren’t showing now for no reason, and my “Recent” section isn’t showing the category I have set for it. Any thoughts guys? This is very urgent now!
November 24, 2014 at 12:07 am #356392So, I removed the custom portfolio.php edits that Elliott suggested, and it’s working okay now. His edit added exclusion functionality to the portfolio grids, but it kept excluding the posts even after I turned it off. If you can get the portfolio grid to properly exclude a number of posts, then we’ll be in business! Thanks!
November 24, 2014 at 8:01 am #356581Hey!
Blog grid is the blog style that you can set on the Blog Posts, right? Like I said, the blog posts doesn’t have a custom link feature like the portfolio items have. Please follow the suggestion above.
Best regards,
IsmaelNovember 26, 2014 at 2:44 am #358106Ok, so based on your last suggestion, I need to select “Link” as the post format on my portfolio item posts? The problem is, I don’t see a post format option on my portfolio items. Since that’s not an option, I need to use a portfolio grid with portfolio items, but the only thing I need is to exclude the first post from a portfolio grid. Is that possible?
November 26, 2014 at 5:14 pm #358364Hey!
Alright. I didn’t understand at first that you set the Blog Posts to show your portfolio items. Since you’re using the portfolio grid now, try to offset the portfolio items with the discovery category using this on functions.php:
add_filter( 'avia_post_grid_query', 'avia_portfolio_query', 10, 2); function avia_portfolio_query( $query, $params ) { if($params['categories'] == 20)$query['offset'] = 1; return $query; }
Change the category id 20 to the id of the discovery category. Adjust the offset value if needed.
Cheers!
IsmaelNovember 26, 2014 at 8:08 pm #358510Is there a way to get this option in the admin area? Otherwise I’ll need to change the value every time I add a new video. I’d like my client to be able to set it without editing code.
The portfolio.php code that Elliott sent earlier added the option to exclude posts from the portfolio grid, but it just didn’t work well. Is there a better way to add the same solid code to the portfolio grid that’s currently in the blog grid options to exclude posts?
Thanks for your help!
November 26, 2014 at 8:15 pm #358516Maybe you can help me come up with a better solution than what I’m asking:
You saw that I have one featured video at the top of my site. I simply want to exclude that video from whichever category section it would be in below it. Ideally, any new video added would automatically show in the top featured section first, and wouldn’t show in any other section, then when another new video is added, the previously featured video would show up in it’s correct category section, and that newest video would only show in the featured area.
Does that make sense? With the exclusions we’re trying to achieve, we would still need to manually adjust each section depending on which category that newest video was in. This wouldn’t be terrible, but if everything automatically went where it was supposed to, it would be fantastic. What do you think?
November 27, 2014 at 5:07 am #358820Hi!
I’m not sure what code Elliott added to the portfolio grid element. I’ll ask him to take a look. If you want a more sophisticated solution other than what we can provide here, you might need to hire a freelance developer. Or request the feature on our Feature Requests page.
Regards,
IsmaelNovember 27, 2014 at 4:32 pm #359057Hey!
The file I provided adds an offset option to the portfolio element which was originally what you were trying to do.
Your request was already bordering custom work though so like Ismael suggested it would be best to hire a freelancer to help you out with this customization. We’ll see if we can get some more options added to these shortcodes in the future.
Regards,
ElliottJanuary 23, 2015 at 12:33 am #384115why is this function not added to the theme already.. there’s like a ton of possibilities that get unlocked with this type of thing.. the “blog posts” element stinks.. (I must sound like a little kid who gets denied much wanted candy :P haahaha ^_^ )
It’s these tiny inconsistencies that bug me with enfold.. the offset function should be available on all dynamic elements..
All ‘n all I ain’t complaining.. I work together with a bunch of friends.. and we’ve build like 50 websites on enfold now.. and we’re really really happy with it overall ;-)
January 23, 2015 at 10:01 pm #384656Hey!
@joax, Please create a feature request, https://kriesi.at/support/enfold-feature-requests/, and vote on it and we may see something get added in a future update.Best regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.