Support » How-To and Troubleshooting » [Resolved] *get_theme_mod* seems not returning any value after upgrading tp WordPress 3.1

[Resolved] *get_theme_mod* seems not returning any value after upgrading tp WordPress 3.1

  • Hi there,

    My theme got a serious problem when upgrading to WP 3.1, it seems that *get_theme_mod* does not return any value.

    Theme could be download at: http://bit.ly/gWNPVd

    I set the get_theme_mod value via Theme Options in functions.php:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The theme / above code is working properly when using WP 2.8 – 3.0.5, but not working in 3.1, it’s very urgent, any one could help?


Viewing 13 replies - 1 through 13 (of 13 total)
  • Any one have similar problem?

    I’m having the exact same problem. My options page code is the same as above, and it quit working with the upgrade to 3.1. It has worked fine in all previous versions of WordPress. Does anyone know what changed in WordPress that is causing this problem?

    Fixed the issue:





    That fixed it for me. Thanks, rguan!

    I have the same problem with my theme. if have do the same thing which you have suggest by rguan but unable to save and retrieve values. Please help me out its very urgent.

    Here is my code which i am using.


    You should change the theme folder name to the same as the theme name.

    Could you let me know your site URL and which you are using so that I can check for you?

    You can also change 'theme_mods_'.get_current_theme();

    to 'theme_mods_themename';

    Use the actual name of your theme, and make it lowercase.

    Changed “$settings = ‘mods_’.get_current_theme();”

    To ” $settings = ‘theme_mods_’.get_current_theme();

    its still not working for me… Can’t save the settings. Reset is also not working. its showing the previous settings stored in the DB


    What’s the name of your theme, and what’s the name of the folder that your theme is in?

    The Theme Name & Theme Folder is same, I figured out there are two problems:
    1- Save setting Button is not working
    if(isset($_REQUEST['updated']) == 'true'){}
    this is not working

    2- Register Settings is not working when I use array
    register_setting('my_settings', $settings);
    where $settings is an array.. But if I use a single variable it works then. =(

    Thanks in advance =)

    instead of

    Same problem to me

    fixed in this way:
    1: change:

    2: Changed Theme Name to be the same of Theme Folder

    Changing to ‘theme_mods_’ worked for me, too. Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] *get_theme_mod* seems not returning any value after upgrading tp WordPress 3.1’ is closed to new replies.
Skip to toolbar