Navigation

This content is old and no longer supported. You may use at your own risk, but no official support will be provided for anything listed here. If you are a Themeco customer, we invite you to check out our new community and forums, Apex.

Tagged: 

  • Author
    Posts
  • #1287069

    phasstw
    Participant

    Hello,

    I want to run simple PhP codes on my webpages through the Cornerstone editor. I first attempted to use the Raw Text Element, but discovered it did not allow for PhP. I have read https://community.theme.co/kb/cornerstone-custom-elements/ and have tried to make an element that allows me to put my php in a textarea and have it run on the page; however, I have had no success. This really is a simple feature for such a wonderful theme, so I am disappointed that there is no easy way to use PhP on an X Theme website. Please, provide me with some more guidance on how to get PhP running on my webpages though a custom cornerstone element and also implement this basic functionality into the theme.

    Phasstw

    #1287070

    Paul R
    Moderator

    Hi,

    Sorry, php code is not allowed in cornerstone elements.

    You can create scripts and convert it to shortcodes and use it inside cornerstone.

    https://codex.wordpress.org/Function_Reference/add_shortcode

    Hope that helps.

    #1429253

    Kalle Johansson
    Participant

    This is a major headache for the site I am trying to build.

    In regular WordPress pages, without CS, the plugin Insert_PHP works to execute php code between the placeholders [insert_php] and [/insert_php]. Very convenient. Is there no way I can make this work within CS?

    #1429283

    Rad
    Moderator

    Hi there,

    I tried and seems to be working on my installation. It could be related to something else, like configuration or security that doesn’t allow PHP execution since it could be a source of an attack. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks!

Join Apex

This content is old and no longer supported. We invite you to check out our new community and forums, Apex.

Join Apex