Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

getting the page option values issue

Open cristeacosmin opened this issue 11 years ago • 2 comments

So, I added a type text option for pages, it renders in the backend , I add some text to it and save the page.

In the frontend I'm trying to get the value using some snippet found here:

$page_options = fw()->theme->get_post_options('page'); $box = $page_options['main']; fw_print($box, true);

and I can see the array with the option I just added, however it has no value.. i must be doing smth wrong but can't figure out where.

I found this post as well: https://github.com/ThemeFuse/Unyson/issues/143

but I can't seem to figure it out.

cristeacosmin avatar Jun 13 '15 21:06 cristeacosmin

use this

fw_get_db_post_option(get_the_ID(),'option_name');

danyj avatar Jun 13 '15 21:06 danyj

ur awesome, thanks :) :+1:

cristeacosmin avatar Jun 13 '15 21:06 cristeacosmin