
Tagged: blog post, blog post eliment, custom post, custom post types
-
AuthorPosts
-
June 19, 2025 at 3:00 pm #1485678
I have a custom post type set-up using the Custom Post Type UI plugin. The posts are displayed on pages in the website using Enfold’s Blog Posts or element.
The post displayed fine until recently. Now, if I make a change to the category selected in the Blog Post element, no posts display after saving the change/updating the page. The same thing happens even if I just save the Blog Post element without making any changes.
Help addressing this issue would be great.
June 20, 2025 at 8:18 am #1485705Hey NicomIT,
Thank you for the inquiry.
Where can we check the issue? Please create a test page and provide the login details in the private field so we can investigate. Make sure that Appearance > Theme File Editor is accessible.
Best regards,
IsmaelJune 20, 2025 at 1:13 pm #1485727Hi Ismael,
Sure. Below is a link to a page that displays thumbnails/links for the custom posts. If you edit the page and look under the “LAS VEGAS” and “OAHU” headers, you will see the blog post element from Enfold. But when viewing the page, nothing displays for either of those. For both of those, all I did was make a change to the blog posts element and saved it. After that, they no longer displayed any posts.for the one under “OAHU”, I just copied the one below it on the page, opened the eminent and clicked save without making any changes. Now it doesn’t display any posts.
The custom post type for these posts in the left menu of the WordPress dashboard is “Hotels & Resorts” and a link for that is provided below.
Ryan
June 23, 2025 at 9:19 am #1485783Hi,
Thank you for the inquiry.
We temporarily disabled the post type selection by removing the following code from the functions.php file but the issue persists.
add_theme_support('add_avia_builder_post_type_option');
We also noticed that the issue only occurs when the Grid Layout style is selected. Please try to temporarily remove the postslider.php file from the child theme’s shortcodes folder.
Let us know the result.
Best regards,
IsmaelJune 23, 2025 at 2:16 pm #1485800Hi Ismael,
I renamed “postslider.php” to “postslider.php_” so it’s no longer active. That didn’t seem to do anything for the areas where the posts are not displaying under the “LAS VEGAS” and “OAHU” headers.Ryan
June 24, 2025 at 7:06 am #1485823Hi,
Which posts or items are under the Las Vegas category? When we checked, there was only one item under the “On The Strip” category and none under “Off The Strip”. The blog posts element for Oahu was duplicated, so the post in the duplicate under the Oahu category were already displayed in the original element. We removed the duplicate.
These are the posts under the Oahu category:
Best regards,
IsmaelJune 24, 2025 at 1:53 pm #1485837Hi Ismael,
“The Royal Hawaiian, A Luxury Collection Resort” was the one post under the “Las Vegas” category. The link for the post is provided below.I just created four new test posts under “Hotels & Resorts”. Two for “Las Vegas” > “Off the Strip” and two for “Las Vegas” > “On the Strip”. I also updated the “Hawaii Recommended Resorts” page we are looking at with headers and blog posts elements for “LAS VEGAS – OFF THE STRIP” and “LAS VEGAS – ON THE STRIP”. The categories for both are set correctly and we should be seeing the four new test posts displayed under those headers, but nothing is showing.
I also went further down the page and opened the blog element under the “MAUI” header, made no changes, but clicked “Save” and then updated the page. Now there are no posts displaying there. So something is happening when you simply save one of the blog post eliments.
-
This reply was modified 2 weeks, 5 days ago by
NicomIT.
June 25, 2025 at 7:42 am #1485878Hi,
Thank you for the update.
We may need access to the file server to further investigate the issue. Please provide the S/FTP details in the private field. In the meantime, try to temporarily disable all modifications in the functions.php file and any template overrides (footer.php, header.php etc) in the child theme, and see if that makes any difference.
Best regards,
IsmaelJune 25, 2025 at 7:27 pm #1485905Hi Ismael,
I had someone else here have a look and believe we found the issue. Below is what they said and found. Hopefully this helps provide the info you need to resolve things. The FTP info you requested is provided in the private field.Here’s what they said…
I retrieved a copy of the post data and metadata before saving, without making any changes, and then compared it to the data and metadata afterwards. The issue was apparent.
Before editing, the postmeta value for the _aviaLayoutBuilderCleanData meta_key has [av_blog…] elements that look like:
[av_blog blog_type='taxonomy' post_type='hotels-resorts' link='canada-categories,248' term_rel='' blog_style='blog-grid' content_length='content' contents='excerpt' date_filter='' date_filter_start='' date_filter_end='' date_filter_format='yy/mm/dd' period_filter_unit_1='1' period_filter_unit_2='year' page_element_filter='' offset='0' conditional='' bloglist_width='' columns='4' preview_mode='custom' image_size='portfolio' items='-1' paginate='no' img_scrset='' lazy_loading='disabled' alb_description='' id='' custom_class='adventures-post blogpost-image-fixing' template_class='' av_uid='av-2ivazvo' sc_version='1.0' orderby='' order='']After saving, without making any changes, we have:
[av_blog blog_type='taxonomy' link='canada-categories,248' term_rel='' blog_style='blog-grid' content_length='content' contents='excerpt' date_filter='' date_filter_start='' date_filter_end='' date_filter_format='yy/mm/dd' period_filter_unit_1='1' period_filter_unit_2='year' page_element_filter='' offset='0' conditional='' bloglist_width='' columns='4' preview_mode='custom' image_size='portfolio' items='-1' paginate='no' img_scrset='' lazy_loading='disabled' alb_description='' id='' custom_class='adventures-post blogpost-image-fixing' template_class='' av_uid='av-2ivazvo' sc_version='1.0']The saved version is missing the post_type=’hotels-resorts’ attribute.
When I manually add these to the database, the posts reappear.
June 26, 2025 at 7:33 am #1485927Hi,
Thank you for the update.
The post_type attribute can be adjusted using the Select Post Type option, but when we re-enabled it using the add_avia_builder_post_type_option in the functions.php file, the post type “hotels-resorts” was not found. This could be due to a missing parameter when the “hotels-resorts” post type was registered or created.
add_theme_support('add_avia_builder_post_type_option');
You may need to set this attribute manually by editing the element shortcodes directly in the debug mode field. Please check the link below:
— https://kriesi.at/documentation/enfold/intro-to-layout-builder/#debug-mode
Once debug mode is enabled, a shortcode field will appear below the Advanced Layout Builder where you can manually set the post_type attribute in av_blog shortcodes.
This is the Select Post Type option:
Another thing that you could try is to select all post types or items in the Select Post Type list.
Best regards,
IsmaelJune 26, 2025 at 2:48 pm #1485953Hi Ismael,
Thanks for that info. We were able to set the post type using the shortcodes. However, that’s not ideal for our client when they are editing these pages.When editing the blog post elements should we be seeing the custom post type listed under “Select Post Type”? Or should anything in that list be selected? Previously, we have not needed to select anything from that list. But I am wondering if the issue is that nothing is selected?
http://staging.maritimetravel.ca/wp-content/uploads/2025/06/Select-Post-Type.jpg
Is it possible there is an issue with the Custom Post Type UI plugin? All of this was previously working for quite some time, until recently. So it seems like it could be related to an update to the plugin or Enfold.
June 27, 2025 at 7:55 am #1485996Hi,
The “Select Post Type” option is not enabled by default, but it was probably enabled by the previous developer. You can disable it back by removing the following code from the functions.php file:
add_theme_support('add_avia_builder_post_type_option');
After disabling the option, you may need to re-add the Blog Posts element or manually edit the shortcodes and remove the post_type attribute, then update the page so it’s synced with the database.
Is it possible there is an issue with the Custom Post Type UI plugin?
Yes, it’s possible that there’s an issue with the creation of the custom post type “hotel-resorts.” Another thing you could try is to select all items or the “Post Types” option in the list, since the “hotel-resorts” post type is not available, and see if that works.
Best regards,
Ismael -
This reply was modified 2 weeks, 5 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.