How can I get my options in json response?

You shouldn’t save your theme’s options one by one. In that case, you should call each of them separately, or store them in an array and then run a loop to get their values: $options = array( ‘option1’, ‘option2’, ‘option3’); foreach( $options as $option ){ // The rest of your code } But the proper … Read more

Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]

After some testing I found the best way is to use a walker. For this example lets say that this is the code that calls our menu wp_nav_menu([ ‘container’ => false, ‘theme_location’ => ‘right-side-top-menu’, ‘walker’ => new Menu_Middle_Logo() ]); Now for our walker, there isn’t an easy way to determine which of the parent menu … Read more

Put standard wordpress options into a theme options panel?

An easier approach would be to leave the options-general.php sub menu unblocked and define: define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); in your wp-config.php. When the siteurl and homeurl are defined in wp-config.php the options are grayed out on the options page. This would allow your client to change the site title, description, time zone and registration settings.

Disable image resizing on specific upload fields

WordPress will always create the additional images for “thumbnail”, “medium” and “large” sizes. The options panel doesn’t add an additional size- it just resizes the one you’ve selected using CSS. If you want to override that CSS you can hook in an additional stylesheet that will override the id on that option.

Should a child theme share the same theme options row as the parent, or should it have it’s own options row?

Neither. Theme options should be stored as theme mods, using get_theme_mod and set_theme_mod. Internally these map on to options, but it is the official way to store theme specific options, that way when you change themes you don’t get clashes, and your settings are preserved for if you ever change back. It’s the classic adage … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)