3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WordPressでTabbedWidgetが動作しないときの対処

3
Posted at

WordPress3.xでTabbedWidgetが動作しなくなったら、tabbed-widgets/tabbed-widgets.phpのaddHeader()に少し記述を追加する。

function addHeader() {
	wp_enqueue_script('jquery-ui-tabs',  $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, false);
	wp_enqueue_script('jquery-ui-accordion',  $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, false);
	wp_enqueue_script('jquery-ui-cookie',  $this->plugin_path . 'js/jquery-cookie.min.js', array('jquery-ui-accordion'), false, false);

	// Add default widgets styles
	wp_enqueue_style('tabbed-widgets', $this->plugin_path . 'css/tabbed-widgets.css');

	wp_enqueue_script('jquery-ui-accordion',  $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, true);
	wp_enqueue_script('jquery-ui-cookie',  $this->plugin_path . 'js/jquery-cookie.min.js', array('jquery-ui-accordion'), false, true);
		
	// Add default widgets styles
	wp_enqueue_style('tabbed-widgets', $this->plugin_path . 'css/tabbed-widgets.css');
	
	if (get_current_theme() == 'Twenty Ten') {
		wp_enqueue_style('tabbed-widgets-2010', $this->plugin_path . 'css/twenty-ten.css');
	}
}

ページキャッシュを無効にしたらタブが正常にでるはず。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?