freshbrains Posted July 19, 2018 Share Posted July 19, 2018 Hey there I was hoping for some advice please. I have a wordpress website but I want to add a custom php app (library files includes php/js/css and some php code to be pasted in the page) to a specific page. I've read it's not good practice to put the files in root directory and can understand why. The app is only suppose run on a specific page and having it running outside of wp is not where I want to go. So I'd really like to be able to put the files somewhere else in the wp directory and call the script using the themes functions.php or perhaps add a custom plugin to achieve this. I'm a bit of a noob and not sure how to do either of these, so any tips would be greatly appreciated. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/307527-how-to-add-custom-php-app-in-wordpress/ Share on other sites More sharing options...
Jim R Posted July 25, 2018 Share Posted July 25, 2018 What are you trying to do? I'm a PHP tinkerer at best, with a lot of help, but I've been using PHP in WordPress for about a decade. If you're talking about creating a plugin, that's a process that's pretty easy to start, but really tying it into your site, you'll need to study up on WordPress' codex and template tags: https://codex.wordpress.org/Template_Tags If you're talking about putting information onto certain pages, now you're talking about inserting PHP into a page, which isn't native in WordPress. I'd get a plugin called PHP Code Snippet by XYZscripts. It's fantastic, and it allows you to easily use code snippets through your site. From there, I use INCLUDES to associate PHP files to my WP Pages, and I update the PHP files in any text editor. I would recommend checking out the Template Tags no matter what. You can use them in your PHP files just for simple calls, as a lot of what I do involves referring to items within WP. 1 Quote Link to comment https://forums.phpfreaks.com/topic/307527-how-to-add-custom-php-app-in-wordpress/#findComment-1560043 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.