• Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Help for PHP

HeavyMercury

HeavyMercury

New Member
Hi guys,

I'm working on a review website with Elementor and a tons of addons but currently I'm stuck on a stupid thing. I'd like to show the review score in the post block but I couldn't figured out how to do it. My review score had an id class "notation" and I've found this code to use in php :

<?php

$doc = new DomDocument;

// We need to validate our document before refering to the id
$doc->validateOnParse = true;
$doc->loadHtml(file_get_contents('link.php'));

var_dump($doc->getElementById('div1'));

?>

How do I set the line "file_get_contents" to automatically find the related source post page ? It always shows NULL and that's a little bit frustrating. I know that it is a bit complex but I really need this to work... :(

Thank you for the future support you'll provide me.
 

Latest Resources

Other Elementor Resources

elementor official

Still stuck? Ask the forum

Post your question with a screenshot and a link if you can, and a member will usually reply within a day. Free to join, no sales pitch.

Create a free account
Top