Title: basic php not working
Last modified: April 22, 2020

---

# basic php not working

 *  [jaehunkim](https://wordpress.org/support/users/jaehunkim/)
 * (@jaehunkim)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/basic-php-not-working/)
 * I’m new to Airpress and Airtable but it looks promising. I have successfully 
   set up a connection and using Virtual Fields in the body copy of a post using
   shortcodes.
 * [apr field=”Adult”]
    [apr field=”Cost Kids”]
 * However, I use the PHP Code Widget to build sidebars and was having trouble writing
   php code that works with Airpress. Airpress has a basic script on the site which
   I have modified with my column names. The only thing that displays is a colon.
   What else do I need to do to make the php work?:
 * Basic script that is on Airpress Plugin Page:
 * <?php
    $e = $post->AirpressCollection[0]; echo $e[“Name”].”: “.$e[“Start Date”].”
   <br>”; ?>
 * With modification:
 * <?php
    $e = $post->AirpressCollection[0]; echo $e[“Adult”].”: “.$e[“Cost Kids”].”
   <br>”; ?>

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chester McLaughlin](https://wordpress.org/support/users/chetmac/)
 * (@chetmac)
 * [6 years ago](https://wordpress.org/support/topic/basic-php-not-working/#post-12731029)
 * Can you send me a link to where I can learn more about this PHP Code Widget? 
   I’m assuming it’s a plugin?
 * In the meantime, try turning on debugging ([https://wordpress.org/support/article/debugging-in-wordpress/](https://wordpress.org/support/article/debugging-in-wordpress/))
   and checking logs.
 * My first guess is that it may be a “race condition” where the PHP Code Widget
   is processing the code before (or in a different scope) than Airpress.

Viewing 1 replies (of 1 total)

The topic ‘basic php not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/airpress_c9d28c.svg)
 * [Airpress](https://wordpress.org/plugins/airpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/airpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/airpress/)
 * [Active Topics](https://wordpress.org/support/plugin/airpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/airpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/airpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chester McLaughlin](https://wordpress.org/support/users/chetmac/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/basic-php-not-working/#post-12731029)
 * Status: not resolved