Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Adding pages using the WordPress Rest Api #1033031

    Thanks a lot.

    With a little change in ‘template’ page retrieval method and with the changes you suggested we managed to go one step further towards the final goal.

    in reply to: Adding pages using the WordPress Rest Api #1031692

    Dear Ismael,

    Thanks a lot for your answer. I have tried out what you suggested but I am encountering some problems/challenges for what I can’t find the solution.

    This is what I have included in functions.php:

    “add_action(‘init’, ‘change_editor’);
    function change_editor()
    {
    $args = array(
    ‘post_type’ => ‘dzndoc’,
    ‘numberposts’ => -1,
    );
    $myposts = get_posts($args);
    if( $myposts ) {
    foreach ( $myposts as $mypost ) :
    AviaBuilder::set_alb_builder_status(‘active’, $mypost->ID);
    AviaBuilder::save_posts_alb_content($mypost->ID, $mypost->post_content);
    endforeach;
    wp_reset_postdata();
    }
    }”

    This activates the AdvancedLayoutBuilder for all my post, i.e. it creates and properly fills in the following meta_keys in wp_postmeta: _aviaLayoutBuilder_active and _aviaLayoutBuilderCleanData, but I am missing, as far as I can tell, at least the following two meta_keys: _avia_builder_shortcode_tree and _av_alb_posts_elements_state.

    My problem is that in editor mode I do not see the content elements which are defined in my page.

    See following example:

    For the following post:

    <div class=”flex_column av_one_fifth flex_column_div av-zero-column-padding first ” style=”border-radius: 0px;”>
    <div class=”av-special-heading av-special-heading-h1 ” style=”padding-bottom: 10px;”>
    <h1 class=”av-special-heading-tag “>Menu</h1>
    <div class=”special-heading-border”>
    <div class=”special-heading-inner-border”></div>
    </div>
    </div>
    <div class=”avia-builder-widget-area clearfix “>
    <div id=”dc_jqaccordion_widget-4” class=”widget clearfix “>
    <div id=”dc_jqaccordion_widget-4-item” class=”dcjq-accordion”></div>
    </div>
    </div>
    </div>
    <div class=”flex_column av_four_fifth flex_column_div av-zero-column-padding ” style=”border-radius: 0px;”>
    <div class=”av-special-heading av-special-heading-h1 ” style=”padding-bottom: 10px;”>
    <h1 class=”av-special-heading-tag “>Manipulate the Look of Diagrams</h1>
    <div class=”special-heading-border”>
    <div class=”special-heading-inner-border”></div>
    </div>
    </div>
    <section class=”av_textblock_section “>
    <div class=”avia_textblock “>
    <div class=”paragraph”>

    Many crossing lines in your system diagram or a very wild sequence diagram? Dezyne takes the order of the interface provides and requires declarations as the order in which objects are drawn left to right. So by changing the order of these declarations you can manipulate how the diagrams look like. E.g. compare pictures below (taken from the Camera example):

    </div>
    <div class=”paragraph”>

    <span class=”image”>image</span>

    </div>
    </div>
    </section></div>

    I have the following rows in wp_postmeta:
    205339 32801 _aviaLayoutBuilder_active active
    205340 32801 _aviaLayoutBuilderCleanData <div class=”flex_column av_one_fifth flex_column_div av-zero-column-padding first ” style=’border-radius:0px; ‘><p><div style=’padding-bottom:10px; ‘ class=’av-special-heading av-special-heading-h1 ‘><h1 class=’av-special-heading-tag ‘ itemprop=”headline” >Menu</h1><div class=’special-heading-border’><div class=’special-heading-inner-border’ ></div></div></div><br />
    <div class=’avia-builder-widget-area clearfix ‘><div id=”dc_jqaccordion_widget-4″ class=”widget clearfix “>
    <div class=”dcjq-accordion” id=”dc_jqaccordion_widget-4-item”>

    </div>
    </div></div></p></div>
    <div class=”flex_column av_four_fifth flex_column_div av-zero-column-padding ” style=’border-radius:0px; ‘><p><div style=’padding-bottom:10px; ‘ class=’av-special-heading av-special-heading-h1 ‘><h1 class=’av-special-heading-tag ‘ itemprop=”headline” >Manipulate the Look of Diagrams</h1><div class=’special-heading-border’><div class=’special-heading-inner-border’ ></div></div></div><br />
    <section class=”av_textblock_section ” itemscope=”itemscope” itemtype=”https://schema.org/CreativeWork&#8221; ><div class=’avia_textblock ‘ itemprop=”text” ><p>
    <div class=”paragraph”>
    <p>Many crossing lines in your system diagram or a very wild sequence diagram? Dezyne takes the order of the interface provides and requires declarations as the order in which objects are drawn left to right. So by changing the order of these declarations you can manipulate how the diagrams look like. E.g. compare pictures below (taken from the Camera example):</p>
    </div>
    <div class=”paragraph”>
    <p><span class=”image”>image</span></p>
    </div>

    </p>
    </div></section></p></div>

    210208 32801 _edit_lock 1541767986:46

    So my question boils down to: How do I get the rest of the needed meta_keys in wp_postmeta for my posts such that I will be able to edit content elements in the Advanced Layout Builder?

    Thanks in advance for your reaction.

    in reply to: Adding pages using the WordPress Rest Api #1022693

    Dear Ismael,

    Thanks a lot for the provided answer but we are missing an important step (we think), namely how to ensure that the called function AviaBuilder::set_alb_builder_status is recognized? We tried several alternatives, like include, like use or like require, but none worked.

    Additional info: we plan to call this function in one of the php files of our plugin (in which namespaces are used and classes are referred by use statements and composer with autoload is also used.

    Thanks in advance.

Viewing 3 posts - 1 through 3 (of 3 total)