Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #989206

    I build a page with the visual builder.

    I add as example a 50% 50% layout. => working great.

    If I use the code:

    $post = get_post(126); 
    echo $post->post_content;

    it shows me the codes. Fine..

    $post = get_post(126); 
    echo do_shortcode($post->post_content);

    does give me the HTML code, BUT destroyed. the 50% 50% stuff is now 100% 100% wide.
    I can see in the code a lot more <!–close column table wrapper. Autoclose: 1 –> stuff, as it seams the Enfold thinks it need to close the wrapper instead of letting it stay as it is.

    That destroys me the design of the page, as I need to output the content on an other place.

    Is there another do_shortcode funktion for enfold? or what filter do you apply?
    Something about newline the issue?

    #989214

    I also tried to use:

    $content = apply_filters('avia_builder_precompile', get_post_meta(126, '_aviaLayoutBuilderCleanData', true));
    		$content = apply_filters('the_content', $content );
    		$content = apply_filters('avf_template_builder_content', $content);
    		echo $content;

    Without luck, same issue. all 1/2, 1/3, etc are 100% wide…

    I did also remove all newlines and returnes from content and tried then to “convert it via do_shortcode() without luck.
    Code used:
    $content = preg_replace(array("/\][\r\n\s\t]*/m","/[\r\n\s\t]*\[/m"),array("]","["),$post->post_content);
    How does enfold detect if a colum table need to be closed or not.. frustrating really :(

    #989219

    well….

    I removed:
    min_height='av-equal-height-column'
    from the shortcode, as in an other thread somebody said that this is causing the issue… The response of the moderator was “not Enfold standard, work please get a developer”

    I did:

    $post = get_post(126); 
    $content = str_replace("min_height='av-equal-height-column'","",$post->post_content);
    echo do_shortcode($content);

    now its working again.

    But that is clearly somewhere a big bug in your code, that this property in the shortcode breaks the complete responsiveness. It seams the “equal height” detects every part as “own” part and splitts them, instead of aligning them besides each other.

    So, the output is working, but not the equal height… lesser problem, perhaps you have a fix.

    #989539

    Hi,

    Thank you for using Enfold.

    You have to compile the content first. There’s an available function for that.

    $post = get_post(120);
    $content = Avia_Builder()->compile_post_content( $post );
    echo $content;

    Best regards,
    Ismael

    #990074

    Yes and no.

    $post = get_post(126);
    $content = str_replace("min_height='av-equal-height-column'","",$post->post_content);
    $content = do_shortcode($content);

    Show me the page without a sidebar, as the layout is set up.

    $post = get_post(126);
    $content = Avia_Builder()->compile_post_content( $post );

    Does work, but show me the product page with a sidebar. where can I disable the sidebar?
    Page 126 doesn’t have one set. Product page cannot be “changed” anywhere…

    Default Page Layout of enfold is set without sidebar…

    • This reply was modified 6 years, 4 months ago by BlutVampir.
    #990098

    Hi,

    Where did you add the code? Did you create a new template file and add the code there? Please provide a link to the product page.

    Best regards,
    Ismael

    #990226

    I did add it in the product single template. The site is only reachable internally yet.

    woocommerce/template/content-single-product.php
    (of corse in a copy in the child theme ;) )

    #990628

    Hi,

    You can try this filter to disable the sidebar on product pages.

    add_filter('avia_layout_filter', 'avia_change_product_layout', 10, 2);
    function avia_change_product_layout($layout, $post_id) {
        if( is_singular('product') ) {
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
    
        return $layout;
    }

    Best regards,
    Ismael

    #1291312

    Hi,

    this issue is still relevant for me (Enfold 4.7.6.3). The given solutions do not work for me.
    When I’m using “do_shortcode($content)”, some columns get 100% width – just as BlutVampir described.
    The shortcode I’m using is just an icon:

    [av_font_icon icon='ue906' font='econsor-system-icons' style='' caption='' link='' linktarget='' size='20px' position='right' animation='' color='#21759b' av_uid='' custom_class='' admin_preview_bg=''][/av_font_icon]

    If replaced with a button, the problem still persists.
    Is there something new about this issue?

    Best regards,
    Fabian

    #1291936

    Hi,

    Are you also creating a new template? Please post the actual template file and the link where it should be applied so that we can properly check the issue.

    You may also need to add this filter to enable execution of builder shortcodes externally.

    // https://kriesi.at/support/topic/how-to-get-placeholder-to-correctly-output-shortcode/#post-1279016

    Best regards,
    Ismael

    #1294307

    Hi,

    unfortunately, the filter didn’t work.
    We are using the normal template, so no custom template. The only custom thing is the search&filter-part.
    You can see this here: https://www.econsor.de/referenzen-2/

    #1294683

    Hi,

    When I’m using “do_shortcode($content)”, some columns get 100% width – just as BlutVampir described.

    If there is no custom template, where are you using the do_shortcode function?

    Are you using a plugin that allows you to embed PHP code inside a text editor? If that is that the case, then we might not be able to help you out because we are not exactly sure how that plugin renders the output.

    Best regards,
    Ismael

    #1297141

    Hi,

    we’re using the result-page of the plugin Search&Filter. They allow to customize the result page and we are using shortcodes for icons and buttons within the resultpage.
    If you scroll down to “Weitere Kundenrefenzen” and open up one of the references, you can see the content where the shortcodes are executed.

    Best regards,
    Fabian

    #1297310

    Hi,

    Execution of shortcodes outside the builder is not allowed by default and the only way to enable it is by using the filter that we suggested above. Did you add this code in the functions.php file?

    function avf_custom_exec_sc_only_mod( $exec_sc_only, $obj_sc, $atts, $content, $shortcodename, $fake ) {
    	return true;
    }
    
    add_filter( 'avf_alb_exec_sc_only', 'avf_custom_exec_sc_only_mod', 10, 6 );
    

    They allow to customize the result page and we are using

    Is it a custom builder? Please ask the plugin author how they return the output or content from that builder, and if there is any filter that we can use to modify its content before rendering it in the page.

    Best regards,
    Ismael

    #1299384

    Hi Ismael,

    I’ve already tried the snippet, but that didn’t work either.
    What do you mean custom builder?
    Search&Filter plugin just allows to make a search- or/and filterform with customized resultpages, so I’ve written only php-code.

    What else can we do then?

    #1299800

    Hi,


    @emilconsor
    : Please create a new thread and post the login details in the private field so that we can check the issue. Provide direct links to the dashboard panels where we can check the forms or the custom php code. Screenshots will help as well. We will close this one for now.

    Best regards,
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘do_shortcode issue on visual builder’ is closed to new replies.