admin管理员组文章数量:1386686
I am trying to create custom widget it appear into a ACF (Advanced Custom Fields) plugin but "Widget Menu is not appearing below appearance menu. here are my codes.
my functions.php
<?php
## import the dependency functions
require get_template_directory() . '/inc/functions-admin.php';
require get_template_directory() . '/inc/widgets.php';
my inc/widgets.php
<?php
/*
@package ManishAgarwal
==================
WIDGET CLASS
==================
*/
class CustomWidget extends WP_Widget {
public function __construct() {
// Instantiate the parent object
$widget_ops = array(
'classname' => 'ma-home-widget',
'description' => 'Custom Home Content Widget',
);
parent::__construct('ma_home_content','MA Home Content', $widget_ops );
}
}
function ma_register_widgets() {
register_widget( 'CustomWidget' );
}
add_action( 'widgets_init', 'ma_register_widgets' );
please suggest where i am doing wrong in above code snippet.
本文标签: Unable to see Widget Submenu under Appearance with Class Based WPWidget
版权声明:本文标题:Unable to see Widget Submenu under Appearance with Class Based WP_Widget 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744566619a2613087.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论