Find Jobs
Hire Freelancers

PHP echo data from Wordpress page into sidebar widget

$10-30 USD

In Progress
Posted over 8 years ago

$10-30 USD

Paid on delivery
Hello, I'm using the Sabai Directory plugin for WordPress ([login to view URL]) to create a directory on my website. I have this installed and working properly. The directory plugin creates a separate page for each each listing. On the listing page there is php which calls the data from the listing. For example: Listing Title: <?php echo $entity->getTitle();?> Phone Number: <?php echo $entity->directory_contact[0]['phone'];?> E-mail Address: <?php echo $entity->directory_contact[0]['email'];?> Slug: <?php echo $entity->getSlug();?> I've created a custom contact form with Gravity Forms, and I've successfully added the php to hidden fields, so that when a website visitor fills out the form on the page, the php data is called into the hidden fields, and when the contact form is submitted, the listing's details are submitted as well. The issue I'm having, and need resolved, I've added a PHP code widget to my sidebar. I want to add another contact form to the sidebar, but when I use the same php, for example: <?php echo $entity->getTitle();?>, in the sidebar it's not working. I get the following error: Fatal error: Call to a member function getTitle() on a non-object in /home/mainst67/public_html/wp-content/plugins/php-code-widget/[login to view URL](27) : eval()'d code on line 1 Warning: Cannot modify header information - headers already sent by (output started at /home/mainst67/public_html/wp-content/themes/enfold/[login to view URL]) in /home/mainst67/public_html/wp-content/plugins/sabai/lib/SabaiFramework/Application/[login to view URL] on line 96 I've contact the plugin developer for help. The plugin adds several widgets which use the listing info in the sidebar, but they say the php sample such as <?php echo $entity->getTitle();?> will not work in the sidebar with out additional coding. <b> To Do</b> This job will be to fix the php code so that the Listing Title, Phone Number, Slug, and E-mail Address can be added to a hidden field of a form in the sidebar. Example: <?php echo $entity->getTitle();?> <?php echo $entity->directory_contact[0]['phone'];?> <?php echo $entity->directory_contact[0]['email'];?> <?php echo $entity->getSlug();?> Example Listing: [login to view URL]
Project ID: 8871519

About the project

3 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $52 USD for this job
User Avatar
Dear Sir, I am really interested to work on this project . I have very good experience of doing this sort of job, I can start the work now and can assure the best service from my end. I am waiting here to discuss about your project , please come on chat. Regards,
$40 USD in 1 day
5.0 (214 reviews)
7.0
7.0
User Avatar
A proposal has not yet been provided
$80 USD in 1 day
5.0 (83 reviews)
6.7
6.7
User Avatar
Hello, My name is Josh and I'd like to help you get this done quickly. I have extensive experience shell coding. Thanks,
$35 USD in 1 day
4.9 (60 reviews)
4.9
4.9

About the client

Flag of UNITED STATES
Eagle Point, United States
5.0
1
Member since Nov 9, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.