• Resolved kivashi

    (@kivashi)


    Hello. I have this problem: The page is made entirely with Elementor (a page builder plugin). I want to protect a particular section of this page but, this section is not editable by text or by tinyMCE (it’s like a widget). So, to make it work, I would have to place 2 shortcode blocks, one for the opening tag, before the content, and another one for the closing tag, after the content, so this way it will not work, because they’re not connected.
    So, how I am supposed to make it work? I’ve tried to use the html editor in the dialog, but this way all the css from elementor is lost…
    Thank you very much in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @kivashi,

    I’m knowing that page builders can be pretty hard thing to work with. I tested Elementor quite some time and could use passster to protect some parts of text within a column.

    But if you like to exclude some of the elements itself you absolutely need some coding experience.

    I’m added this function to passster :
    content_protector_is_logged_in( $password = "", $identifier = "", $post_id = "", $cookie_expires = "" ).

    This should be your starting point. Then you have to check out the dev docs from elementor here https://code.elementor.com/.

    Elementor use parts of the customizer api from WordPress to add settings, options and so on.

    Every widget has a render() method where the markup for rendering is described. You have to place the content_protector_is_logged_in() inside this method.

    BUT: This would break the solution if elementor does any update.

    So you need some OOP PHP knowlegde as well. Every Widget is a class. You have to extend this class. For example: My_Awesome_Widget extends Widget_Base..

    Then you can customize the given render() method and add the conditional function from passster.

    Seems pretty hard I know, but Page builders are very complex products and elementor does a very well job in point of extendability

    Thread Starter kivashi

    (@kivashi)

    Hello Patrick. Thank you for taking your time to reply my issue. Unfortunately, this seems to exceed my knowledge because I only know a bit of css and html, the necessary to solve or create simple situations. At least I hope this post helps someone who has the same problem as me, but knows how to apply your solution.
    I will investigate other or similar ways to do what I’m trying to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to set the shortcode using a page builder (like Elementor)’ is closed to new replies.