Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

PHP in wordpress

Posted on 2013-06-16
7
395 Views
Last Modified: 2013-06-17
I have a PHP part generator that was created and now they are moving the site to wordpress.  How do I go about moving the generator to the wordpress site?  I moved the folder and the database.  The generator is currently at http://sagemetering.com/applicationsdata/ .  Currently I am having no luck getting this to work.  ANy help is greatly appreciated.

Thank you
0
Comment
Question by:solsticeint
7 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39252124
Although that's not nearly enough info, I suspect that you won't get it to work as part of Wordpress.  At the very least, you would have to redesign the theme where the display code is and find some way to resolve the differences between your CSS and javascript and that used by Wordpress.
0
 

Author Comment

by:solsticeint
ID: 39252130
I was afraid of that.  Any suggestions would be most helpful.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39252137
There's no real magic to porting over PHP code to WordPress.  Most of the time you just need to make custom page templates and copy the code over to the template.  You can add custom CSS or JavaScript required to make things work in a number of different ways.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39252199
Unless you convert your website design as Wp themes & features into WP functions. there is no easy way to do
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 39252225
Unless you convert your website design as Wp themes & features into WP functions. there is no easy way to do

This is just not accurate.  WordPress is made with PHP...normal PHP code runs fine.  The only things you need to be aware of are:

1) You have to embed your custom code in a template.  You cannot stick it in the visual editor.

2) You will need to globalize variables if you expect to pass data around

3) If your app has lots of javascript, you will want to use a WordPress function (wp_enqueue_script) to call it properly.
0
 
LVL 82

Expert Comment

by:hielo
ID: 39253210
>>The generator is currently at http://sagemetering.com/applicationsdata/
If I understand you correctly, the link above is from "Site A" (the soon to be old site) and you copied over the applicationdata folder to "Site B" (the WP site).

If that is the case, I would expect it to work if you access it as:
http://thenewsite.com/applicationsdata/index.php

Does it?  If yes, then try routing the requests for "/applicationdata/" to "/applicationdata/index.php" via the .htaccess file:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/applicationsdata/?$ applicationsdata/index.php [NC,QSA,L]

# the rest of your rules follow

Open in new window

0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 39253226
Hello,

You shouldn't need to change anything. Wordpress is just a content management system. As along as the Part Generator worked as a standalone item previously you should be able to create a directory in the root of your site called part-generator or something similar, place all of the code for the part generator into that folder, and then include the part generator in any page you want using an iframe.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why is my wamp get_include_path() wrong? 2 21
php help 34 58
Help with PHP 13 27
Use Select Query to Return Results as a Form 9 23
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question