I need help with this error [duplicate]

Check your themes and plugins for the string uthan_preloader. There is likely a hook or filter somewhere that calls the function above, but the function does not (or no longer) exists. An example of how that could come to be: maybe it was part of a plugin that got deactivated but is still referenced in … Read more

Category callback box problem

Yes there is such possibility. Just change your code to this: $main_category_name = YOUR MAIN CATEGORY NAME; // get the main category of this section (i.e nadchodzące) foreach( ( get_the_category() ) as $category ) { if ( $category->cat_name != $main_category_name ) { $category_name = $category->cat_name; $category_url = get_category_link($category); $cat_com_url = get_comments_link(); } <span class=”cb-category”><a href=”https://wordpress.stackexchange.com/questions/106337/<?php … Read more

custom-background callback breaks media uploader

Long shot, but if you happen to not follow the recommended format and include the number sign with the HEX code when you define the default colour in your theme support, like this: if (function_exists(‘add_theme_support’)) { $defaults = array(‘default-color’ => ‘#666’); add_theme_support( ‘custom-background’, $defaults ); } Then, with your code above, you will end up … Read more

Code works, but warning about call_user_func_array() appears

Somewhere in your theme or plugins, you must have a line like this add_action( ‘something’, ‘yoursite_pre_user_query’ ). Find it and remove or fix it. Also, the get_users function has since been updated. Your first parameter must be an array. <ul> <?php $blogusers = get_users( array(‘blog_id’ => 1, ‘orderby’ => ‘nicename’) ); foreach ( $blogusers as … Read more

Stop post being published

wp_die(); will run AFTER the post is published. You are checking whether the post is published or not, which means the post is already published, what’s done is done. You can update to post status from published to draft instead of using wp_die();. The following code will do it: function check_post_limit( $ID, $post ) { … Read more

settings API: how to create a multi checkbox with blog categories?

I had the same problem, and here what works for me: function journal_check_cats_callback() { $options = get_option(‘journal_theme_blog_2_col’); $pag = journal_theme_blog_2_col; $_cats = get_terms( ‘category’ ); $html=””; foreach ($_cats as $term) { $checked = in_array($term->term_id, $options) ? ‘checked=”checked”‘ : ”; $html .= sprintf( ‘<input type=”checkbox” id=”%1$s[%2$s]” name=”%1$s[]” value=”%2$s” %3$s />’, $pag, $term->term_id, $checked ); $html .= … Read more