How to use Iris color picker on front-end?
you can copy js and css files into your plugin path or theme path, then register and load them with other handles.
you can copy js and css files into your plugin path or theme path, then register and load them with other handles.
If you mean the default WordPress Widgets, you would add this to the functions.php file: <?php // unregister all default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); unregister_widget(‘WP_Widget_Recent_Posts’); unregister_widget(‘WP_Widget_Recent_Comments’); unregister_widget(‘WP_Widget_RSS’); unregister_widget(‘WP_Widget_Tag_Cloud’); unregister_widget(‘WP_Nav_Menu_Widget’); } add_action(‘widgets_init’, ‘unregister_default_wp_widgets’, 1); ?> EDIT: register_sidebar(array(‘name’=>’sidebar2’, ‘before_widget’ => ‘<ul><li>’, ‘after_widget’ => “</li></ul>”, ‘before_title’ => ‘<h2 class=”widgettitle”>’, … Read more
Again and again I see templates using H1 as a image background with nothing within the Tag itself, while this isn’t bad SEO it’s not good either. A header tag should be TEXT and be readible by Google and other search engines. If you take a look at your your see that there is nothing … Read more
If you look at how the code works, you should notice that theme mods are saved in the *_options table under theme_mods_{theme_slug} with the theme slug being, as near as I can tell, the directory name containing the theme stylesheet, so: $ptheme = get_template_directory(); $theme_slug = basename($ptheme); $mods = get_option( “theme_mods_$theme_slug”); As a function: function … Read more
For any project i work i have the following workflow, first what i have setup: Dev environment, local for your own changes, in a server for testing, code review, if you are only one person you can just do it in the server, there is also multisite. Production, or live environment. The project is versioned … Read more
I too had a question about this. Luckily, Chris_O answered it for me. You may also want to check out this question, too. Here’s an example of what I’ve done with meta boxes and you can see it’s quite easy.
See Why does save_post action fire when creating a new post? You’re getting the error as you need to check for the existence of $_POST[‘xxx’], rather than just checking if $_POST is set (it will always be set & an empty array by default). add_action(‘save_post’, function($id) { if ( ( defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE ) || … Read more
you would have to do something like this <?php wp_nav_menu( array( ‘sort_column’ => ‘menu_order’, ‘container_class’ => ‘menu-header’ ) ); ?> The container class you can change your class add more class
You need to do this in two steps. First create the actual widget. Find a widget ID that does not exist, and toss in an extra entry in (off the top of my head) the widget_text option, which corresponds to the text widget config. Off the top of my head, it’ll look something like: $ops … Read more
There doesn’t seem to be an easy way to do this. However, you can try this rather hackish approach: add_filter(‘dynamic_sidebar_params’, ‘my_sidebar_params_cb’); function my_sidebar_params_cb($params) { global $my_widget_counter; if (empty($my_widget_counter)) $my_widget_counter = 1; else $my_widget_counter++; $params[0][‘before_widget’] = str_replace(‘class=”‘, ‘class=”widget_nr_’.$my_widget_counter.’ ‘, $params[0][‘before_widget’]); return $params; }