Call to undefined function get_blog_option()
I think that function is only available in multisite mode. Try: if(is_multisite()){ $path = get_blog_option($blog_id,’siteurl’); }else{ $path = get_option(‘siteurl’);` }
I think that function is only available in multisite mode. Try: if(is_multisite()){ $path = get_blog_option($blog_id,’siteurl’); }else{ $path = get_option(‘siteurl’);` }
you can use the post_thumbnail_html filter hook which passes 5 variables to your hooked function : $html – the Output html of the post thumbnail $post_id – the post ID. $post_thumbnail_id – the attachment id of the image $size – the size requested or default $attr – Query string or array of attributes. So something … Read more
You need to use one add_theme_support() call for each feature. Per the Codex, the proper function call is: add_theme_support( $feature, $arguments );
Yes, create a separate JS file and store it in your plugin or theme folder, lets call it example.js. This file should contain all the common function you need to execute in multiple pages, page-specific functions should go to a separate file. After you’ve written your code in the example.js you need to include it … Read more
When I am thinking about UI something like this is comming to my mind. Something similar has YouTube under the video. When user fills input and clicks enter or submit button to create list, you will send ajax request with list name and save it as a record in wp_usermeta table with meta_key _list_user_1 and … Read more
Our journey starts here with the WP_Customize_Background_Image_Control class, which is a WP_Customize_Image_Control. I’d imagine offering these built-in backgrounds in a new tab alongside the existing Upload New and Uploaded tabs. There are at least two ways of achieving the following: either creating your own modified class based off of the WP_Customize_Background_Image_Control class, or altering its … Read more
I agree with Rarst that on the optimization “to-do” list , this is low-priority. ..however, As far as I know , this statement : This is myth and false Is not always true . Disabled plugins DO use memory in an un-direct way . and sometimes – depending on the quality and the quantity of … Read more
This is how I would update a field named ‘Address’: function updateAddress() { global $current_user; get_currentuserinfo(); $newAddress=”123 New Street”; xprofile_set_field_data(‘Address’, $current_user->id, $newAddress); }
For this example lets say we have the following do_action(‘bt_custom_action’, get_the_ID(), get_the_title(), get_the_content()); The arguments that will be passed to add_action would be in this order the post id the post title the post content By default if we hook into our do_action without any arguments, like this add_action(‘bt_custom_action’, ‘bt_callback_func’); Our call back function “gets” … Read more
jQuery solution: You could try this if you want to use jQuery: <script> jQuery(document).ready(function($) { $(‘li.cat-item:has(ul.children)’).addClass(‘i-have-kids’); }); </script> to add the class i-have-kids to all the li parents that include the items ul.children, within the HTML generated from wp_list_categories(). Category walker solution: You could take a look at the Walker_Category class in /wp-includes/category-template.php and extend … Read more