Solved

PHP in wordpress

Posted on 2013-06-16
7
405 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
[X]
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
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to implement server side field validation and display customized error messages to the client.
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 viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 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