Tagged: custom post types, Lightbox, masonry
-
AuthorPosts
-
September 20, 2017 at 5:20 pm #854480
Hello Kriesi Team,
in my website I’m using a Masonry to display portfolio items. In the portfolio items I set up the Additional Portfolio Settings in order to open a vimeo link in a lightbox.
That’s working perfectly for portfolio items but not for custom post types.
After clicking in fact the content gets opened in a new page, ignoring the above settings.
To avoid Masonry Setting inconsistency, I saved the homepage Masonry and placed in the page based on CTP and I noticed that this is opening the content in lightbox until I change the post type from Portfolio to cpt, and the entries from Portfolio Entries to Categories.Can you please help with that?
September 20, 2017 at 5:46 pm #854499Hey Truemotionpictures,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaSeptember 20, 2017 at 5:57 pm #854512Thank you Victoria!
Please find the access data below.
I’m looking forward to get your feedback.Best regards
September 22, 2017 at 7:30 am #855194Hi,
Thank you for the info.
It’s not going to work for other post types unless the items have the “_portfolio_custom_link” custom fields. You should see this line of code in the config-templatebuilder > avia-shortcodes > av-helper-masonry.php file line 508.
$custom_link = get_post_meta( $id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $id ,'_portfolio_custom_link_url', true) : false;
Best regards,
IsmaelSeptember 22, 2017 at 3:01 pm #855390Hi Ismael,
thank you for the hint!
I added the custom type “directors-works” to the custom link option and it works now!
Here is the code I used:case 'portfolio': case 'directors-works': //set portfolio breadcrumb navigation if($this->atts['set_breadcrumb'] && is_page()) $_SESSION["avia_{$entry->post_type}"] = get_the_ID(); //check if the user has set up a custom link if(!post_password_required($id)){ $custom_link = get_post_meta( $id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $id ,'_portfolio_custom_link_url', true) : false; if($custom_link) $this->loop[$key]['url'] = $custom_link; } break;
Best regards
September 23, 2017 at 3:26 am #855663 -
AuthorPosts
- The topic ‘Open Masonry elements in Lightbox for Custom Post Types’ is closed to new replies.