Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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
    #898402

    Hey 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,
    Victoria

    #898805

    Thanks 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

    #900555

    Hi,

    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.
    #900574

    Thanks Ismael for the workaround, so there is no way to make the advanced layout builder work properly with custom post types?

    #901145

    Hi,

    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,
    Ismael

    #902454

    Hi, 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.

    #902591

    Hi,

    Glad that you figured it out. Thank you for the info. Let us know if you need anything else. :)

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Advanced Layout Builder – Custom Post Type’ is closed to new replies.