Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Plugin Building a WordPress Plugin Settings Page CRUD with the WordPress Options Table

Ronny Ewanek
Ronny Ewanek
4,385 Points

How to display table values?

Hey All!

Using the lessons to create my own plugin, but it's not AJAX based. I'm able to write to the database, but I cannot display it on the front-end. Here's what's in my option_value section:

a:4:{s:26:"restaurant_menu_dish_title";s:4:"Eggs";s:27:"restaurant_menu_description";s:22:"These are awesome eggs";s:21:"restaurant_menu_price";s:2:"$5";s:12:"last_updated";i:1435005136;}

I thought I would be able to echo out the variable $restaurant_menu_dish_title and it would display "Eggs" but nothing happens.

I have it being saved to the database:

$options['restaurant_menu_dish_title']          = $restaurant_menu_dish_title;