Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #410051

    Hi there, just started a new project with your theme and I have a question. I would like to prepend a shortcode to the builder content obtained in the template-builder.

    to do that, I change the template in the child theme to get:

    $cont = "SHORTCODE";
    $cont .= get_post_meta(get_the_ID(), '_aviaLayoutBuilderCleanData', true);
    
    $content = apply_filters('avia_builder_precompile', $cont)
    

    The SHORTCODE is an [av_section], which remains open to the rest of the $content and therefore everything is INSIDE the first section.

    Shouldn’t work that way?

    Thanks

    #410715

    Hi adetec_ing!

    I’m not sure if sections are going to work like that. You will probably need to just use the layout builder when you edit your page and drag the section to your content.

    Cheers!
    Elliott

    • This reply was modified 9 years, 9 months ago by Elliott.
    #410772

    Hi Elliot, thanks for your answer.

    I know that I can do it in the “common” way, but I have a form in the top of every page and for simple pages would be just more work, but the problem comes with the archives and category pages, which are built from the templates, and therefore I have to modify them.

    I don’t want you to tell me how to do it, that’s my work, but to give me some help on the logics of your builder or just a place to look. It seems that it’s just a matter of not closing divs as the following shortcodes (the ones added in the builder) remains INSIDE the first section, but can’t be sure which, where or why.

    I’d appreciate some light in here.

    Thanks

    #410783

    And another question:

    shouldn’t the function

    do_shortcode("[av_section ...] ... [/av_section]")

    close the divs of the created section? Either I’m doing something wrong or I’m using the function in a way it’s not expected :)

    #411265

    Hi!

    The sections require a lot of closing / opening of the layout divs so I don’t think that’s going to work in the do_shortcode call. Instead you could try right clicking your page source and then copy the HTML you see and use that instead.

    Best regards,
    Elliott

    #413891

    Ok. Thanks.

    #414194

    Hi!

    Please get back to us if you have any more questions.

    Cheers!
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.