-
AuthorPosts
-
January 16, 2018 at 12:58 am #897768
Hi,
I’ve followed this thread https://kriesi.at/support/topic/adding-the-avia-layout-builder-to-custom-post-types/ and the ALB is appearing correctly on my custom post types with the code below but the issue I’m having is if I apply any styling using the editor (eg. center the text) it does not render on the front end
eg. https://www.opteonsolutions.com/au/property-services/rating-taxing-valuations/
The editor can be seen at https://snag.gy/0d81fr.jpg which has the first paragraph center aligned
I have created a WP admin account if required
Many thanks
add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'jobs'; /*instead add the name of the custom post type here*/ $meta['page'][] = 'services'; $meta['page'][] = 'wpsl_stores'; } } return $metabox; }
- This topic was modified 6 years, 11 months ago by df50. Reason: Title spelling error
January 17, 2018 at 11:50 am #898402Hey df50,
Please remove the inline styles, we will give you the css to use.
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css.single.single-services .avia-builder-el-2 .avia_textblock * { text-align: center; }
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 18, 2018 at 12:14 am #898805Thanks Victoria, whilst that will resolve it for that particular enquiry, we have a large number of other pages where we need to format individual text blocks with different stryling eg. right aligned. Is there a reason the Advanced Layout Builder isn’t working correctly on custom post types or some code I can use to make it work?
Thanks
January 22, 2018 at 4:44 am #900555Hi,
You can replace the text block with a code block element. ( see private field )
Or apply class attributes to the tags instead of inline style attribute.
Best regards,
Ismael- This reply was modified 6 years, 11 months ago by Ismael.
January 22, 2018 at 5:06 am #900574Thanks Ismael for the workaround, so there is no way to make the advanced layout builder work properly with custom post types?
January 23, 2018 at 5:10 am #901145Hi,
I’m not really sure why the text block removes the inline styling, hence the workaround. Are there any other issues with the advance layout builder aside from this?
Best regards,
IsmaelJanuary 25, 2018 at 1:39 am #902454Hi, thanks for your assistance, I discovered the issue, an import plugin we are using for an XML import was stripping html characters on all single post types, not just the ones it is assigned to. We’ve altered the code and resolved, sorry for the inconvenience.
January 25, 2018 at 6:17 am #902591 -
AuthorPosts
- The topic ‘Advanced Layout Builder – Custom Post Type’ is closed to new replies.