Support » Fixing WordPress » adding pages with my own Mysql queries and php code

  • So I uploaded wordpress successfully onto the hosting server. Looks like its working fine, but now the hard part… When I’m adding a new page and I want to add <$php code, the whole thing is displayed as though there is no PHP…

    Researching this issue was pointing me in the direction of a plugin “exec_PHP” to download and I did, but nothing happened… Is there anything else I have to do besides activating the plugin??

    Also, will that plugin also allow the execution of SELECT queries?

    And finally, isn’t there a simpler way to get things to work? I am an old school php hardcoder, I’m exploring WordPress b’cause I’m told it’s suppose to simplify things, but so far it’s anything but…

Viewing 1 replies (of 1 total)
  • Howdy @louisberger411,

    When I’m adding a new page and I want to add <$php code, the whole thing is displayed as though there is no PHP…

    Well, for starters you want to open PHP with <?php not <$php. Assuming that was just a typo, where are you trying to execute PHP? In the Editor itself? Depending on what you are trying to do, you will want to execute PHP in a template file, functions.php or create a plugin.

    Also, will that plugin also allow the execution of SELECT queries?

    While I have no idea what that plugin does, WordPress has APIs for handling queries. WP_Query, $wpdb, etc.

    Take a look through the developer docs and if you have any specific questions, feel free to continue using this forum for answers.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.