seadonkey Posted April 7, 2014 Share Posted April 7, 2014 Hello there, I am trying to recreate a HTML website on a WordPress website. On the current website we pull a php file from the directory that lists brands for different catrogies. http://www.nongmoshoppingguide.com/brands/feed-and-seed.html We use the following script <!--?php <br ?--> <?php include('../lib/IphoneDataRenderer.php');?><?php echo $IphoneDataRenderer->getAdsForBrandId();?><!--?php } ?--><?php $IphoneDataRenderer listBrandsForCategory(); ?> and it works fine for the website above. However, when I add this code within our WP website we don't get any information (I did add the /lib/iphoneDataRenderer.php files and folders). Could you help me understand what I am doing wrong? Many thanks! Quote Link to comment Share on other sites More sharing options...
seadonkey Posted April 7, 2014 Author Share Posted April 7, 2014 Sorry the correct URL is: http://www.nongmoshoppingguide.com/brands/feed-and-seed.html Quote Link to comment Share on other sites More sharing options...
Rifts Posted April 7, 2014 Share Posted April 7, 2014 you need to look up the correct way to include custom files in wordpress Quote Link to comment Share on other sites More sharing options...
seadonkey Posted April 7, 2014 Author Share Posted April 7, 2014 Thanks Warlock, I did a few brief Google search and didn't find anything too clear. Have you developed/included custom php files in WP before? I'm willing to pay a developer to complete this task. Many thanks Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted April 7, 2014 Share Posted April 7, 2014 (edited) You can create a new page in wordpress and name a folder the same, drop an index file within that and would work. The preferred way with maintaining your header,navigation and footer is to make a new custom page template in your theme. http://codex.wordpress.org/Page_Templates The basics: Create a new file in your current themes folder named what would like, lets call it custom.php Add the following code into custom.php <?php /* Template Name: Custom */ ?> <?php get_header(); ?> <style> <!-- div.custom { width: 80%; text-decoration: none; text-align:center; margin-top:0px; margin-bottom:0px; margin-right: auto; margin-left: auto; padding:0px; } --> </style> <?php echo "<div class='cusrom'>"; echo "custom code gets added this area"; echo "</div>"; ?> <?php get_footer(); ?> In the dashboard create a new page and name whatever you like, select the custom template located lower right area under Template, publish the new page You may also add the sidebar or anything else you desire. Edited April 7, 2014 by QuickOldCar Quote Link to comment 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.