How to add page ID and title inside php

  • I have a php code where I want the page ID and Page Title inside a PHP code. Can anyone help me with this? Thanks

    1. <?php
    2. $cmtx_identifier = 'I want perch page ID here';
    3. $cmtx_reference = 'Perch title here';
    4. $cmtx_folder = '/comments/';
    5. require($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
    6. ?>
  • George G

    Approved the thread.