1

I want to get the saved elementor template list (from this location wp-admin/edit.php?post_type=elementor_library&tabs_group=library) programmatically and display its name as dropdown select menu. How to do that?

1
  • You'll need to inquire in Elementor's support channels Commented Jul 26, 2022 at 0:26

1 Answer 1

3

Found my own answer.

To get the elementor template list you can use this snippets code

$args = array(
  'post_type'      => 'elementor_library',
  'posts_per_page' => 30,
  'tabs_group' => 'library',
  'elementor_library_type' => 'page',
);

$elementor_templates = get_posts($args);

Now, to display it as dropdown select element, you can iterate through elementor_templates

foreach ($elementor_templates as $elementor_template) {
  echo $elementor_template->post_title;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.