Skip to content

Elementor

Armand Tresova edited this page Nov 12, 2024 · 2 revisions

The Cooked plugin includes support for Elementor, making it easier to design and edit recipe posts directly within the Elementor interface. This integration ensures that recipe-specific settings are correctly loaded during Elementor editing sessions, allowing recipe shortcodes and content to render accurately in real-time within the editor.

How Cooked Integrates with Elementor

When editing a Recipe post type (cp_recipe) in Elementor, the Cooked plugin performs the following actions:

  1. Loads Recipe Settings: During an Elementor editing session, Cooked populates the global $recipe_settings variable with the correct data for the recipe being edited. This ensures that all necessary settings, such as ingredients, instructions, and metadata, are available.
  2. Renders Shortcode Content: By loading the $recipe_settings data, Cooked allows any recipe-related shortcodes to display their content correctly within the Elementor interface. This provides an accurate preview of how the recipe will look on the live page.