Solved

PHP in wordpress

Posted on 2013-06-16
7
389 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 82

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now