Okay
  Public Ticket #2746284
Executing PHP Code Using Custom HTML
Closed

Comments

  • Alex started the conversation

    Hello there,

    I have a simple issue to explain. I am trying to execute some PHP code inside your "Raw Content" element. So far it has successfully executed any HTML or JS code I have needed it to.

    But for my current application I need it to echo out some HTML generated using PHP using <?php echo .... ?>

    Nothing I do seems to work. Do you have a solution for how I can execute PHP code? Or is there a fix for the Raw Content element? The <?php echo .... ?> line works on Wordpress by default when editing pages and inserting raw HTML. It also works on other themes as well. Just not BoldThemes ones.


    Thank You.

  •  1,798
    Support Agent replied

    Hi Alex,

    Please note that Raw content is not predicted for that purpose. In order to add PHP code, you should use functions.php file of child theme or some plugin for that purpose like https://wordpress.org/plugins/insert-php-code-snippet/

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!