Giter Site home page Giter Site logo

Comments (2)

sudorakrilico avatar sudorakrilico commented on August 11, 2024 1

Thank you very much @hrrarya, I'm sorry for the delay in answering, I haven't been able to solve it with that solution, the call is made within a rest service, the ajax service is not implemented, it has to be rendered from a direct php function.

Greetings and a thousands thanks

from create-divi-extension.

hrrarya avatar hrrarya commented on August 11, 2024

You could explore out et_builder_load_actions filter, If you are trying to retrieve the html from shortcode.

add_filter( 'et_builder_load_actions', function( $builder_load_requests ) {
	$builder_load_requests[] = 'your_ajax_action_here';
	return $builder_load_requests;
}

and in the action callback function, you can fetch et_pb_layout posts by get_posts function , then loop it and call do_shortcode on each post_content. somthing like

$_layouts = get_posts(
        array(
            'post_type'      => 'et_pb_layout',
            'post_status'    => 'publish',
            'posts_per_page' => -1
        )
    );

foreach ($_layouts as $_layout ) {
   do_shortcode($_layout->post_content);
}

let me know the result. all the best man.

from create-divi-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.