[theme-reviewers] Theme Customizer Question

Stephen Cui scui2005 at gmail.com
Wed Jun 4 01:01:17 UTC 2014


Hi, Chip:

I found the issue after several hours of digging.

Normal I only admin related function by checking is_admin()

if ( is_admin() ) {
   require( get_template_directory() . '/core/theme-customizer.php' );
}

However, the preview is not admin. Thefore I have to remove the is_admin()
check.

Regards

Stephen



On Tue, Jun 3, 2014 at 5:41 PM, Chip Bennett <chip at chipbennett.net> wrote:

> Can you post code somewhere? GitHub/Gist etc.? It's really impossible to
> say for certain what the issue is without seeing what you're doing.
>
> Using the Options API (get_option()) works fine with the Customizer. Have
> a look at Oenology if you need a code reference.
>
>
> On Tue, Jun 3, 2014 at 4:58 PM, Stephen Cui <scui2005 at gmail.com> wrote:
>
>> Hi,
>>
>> I am in the process to change my theme to use customize. I use method 3
>> from Otto's tutorial. However, the customize preview and get_option does
>> not work well. get_option is always getting the value from the database.
>>
>> Is this expected results? Do I missing anything here?
>>
>> Regards
>>
>> Stephen Cui
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140603/37c3db00/attachment.html>


More information about the theme-reviewers mailing list