Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Author ArielK

    (@arielk-1)

    @learnwpbasics Thanks for the clear explanation!

    I did not understand it properly, my problem. In any case, we’ll look into the issue further so that we can fix it the next versions.

    @arielk-1 – thank you so much! ??

    pingram

    (@pingram3541)

    Ok, after looking deeper into the code, this is a bit involved.

    Elementor would need for insert-pages.php (similar to how it does for BB on lines 215-238 and later again on lines 370-393) to call Elementor’s “print_css”, however currently this cannot be done the way the classes are constructed in Elementor.

    Elementor’s print_css method queries using get_the_id() which will not work for this scenario.

    1) Insert Pages needs to be able to pass the page ID, something like:
    $front = new Elementor\Frontend();
    $front->print_css( $inserted_page->ID );

    Which means print_css needs vars to be passed to it and of course the first line needs to be conditional only if an ID was not passed to it.

    2) Other class methods or calls to member functions within print_css also need to be able to be bootstrapped or you only get as far as the first $self->whatever…which results in a Fatal Error because a lot of methods are private/protected

    3) Lastly, the wrapping style tags should have a unique ID so that it doesn’t conflict with another rendered Elementor style appended to the document. i.e. “elementor-frontend-stylesheet-id425”

    If I use the Insert Pages shortcode within a page that already uses Elementor, we should expect 2 unique style tags, one for the actual page and one generated from the Insert Pages shortcode. The only way I can see doing this right now is to rebuild all of Elementor’s parsing done through several files and is very involved.

    I think the above pluggable method is the quickest end to a means but also requires Insert Pages to also add some functionality to recognize and render Elementor css.

    pingram

    (@pingram3541)

    Just wanted to add that last part about the style id; it’s very flexible if you allow it because it can still be targeted generically as div[id^=”elementor-frontend-stylesheet”] but also allows js to parse it for the id.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Page shows Posts differently from how I have designed them in Elementor’ is closed to new replies.