- This topic has 9 replies, 2 voices, and was last updated 4 years, 10 months ago by
David.
-
AuthorPosts
-
June 3, 2021 at 3:18 pm #1809361
melvin
Hi,
I’ve use these 2 Codes to activate MY CPT Archive layout following GP blog in customizer
// Project CPT, Project Tax - Content Column Setting add_filter( 'generate_blog_get_column_count','ke_column_count_project_archive' ); function ke_column_count_project_archive( $count ) { if ( is_post_type_archive('projects') || is_tax( array( 'project_status', 'project_region', 'project_type', )) ) { return 50; } return $count; }; // Project CPT, Project Tax - activate masonry (if not column not working) add_filter( 'generate_blog_masonry','ke_projects_masonry_project_archive' ); function ke_projects_masonry_project_archive( $masonry ) { if ( is_post_type_archive( 'projects' ) || is_tax( array( 'project_status', 'project_region', 'project_type' ) ) ) { return 'true'; } return $masonry; };After implementation of code, it comes with a console error as this https://imgur.com/a/L3bVNaJ
May i know how to fix it?
Thanks
June 4, 2021 at 4:07 am #1809818David
StaffCustomer SupportHi there,
in the Block Element do you have the Keep default post container enabled ?
June 4, 2021 at 7:38 am #1810067melvin
Hi David,
I’ve NOT enable Keep default post container. https://imgur.com/a/qHruRUl
I’ve tried to enable it and then disabled it. Both test also comes with the console error message as mentioned.
P/S: I’ve updated the code in the first post above.
Kindly assist David.
Thanks
June 5, 2021 at 6:16 am #1811153David
StaffCustomer SupportI have been trying to replicate the problem locally but have not been able to.
I just checked your original URL … and it looks like you chosen a different layout. Let me know.June 5, 2021 at 10:03 am #1811544melvin
and it looks like you chosen a different layout
May I Know whats that mean David?
June 5, 2021 at 5:15 pm #1811777David
StaffCustomer SupportAlthough the code still works – it looks like a bug in the script. We’ll get this patched asap, but for the time being you should be able to ignore the error.
June 6, 2021 at 12:42 am #1811920melvin
Hi David,
Thanks for the feedback. So after you get this patched on next theme update the error will be gone right?
June 6, 2021 at 5:19 am #1812109David
StaffCustomer SupportThats correct.
June 6, 2021 at 5:34 am #1812117melvin
Perfect
Thanks David 😁
June 6, 2021 at 6:01 am #1812130David
StaffCustomer SupportThanks for letting us know!
-
AuthorPosts
- You must be logged in to reply to this topic.