File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -89,3 +89,34 @@ function register_testimonials_module() {
89
89
register_post_type ( 'testimonials ' , $ args );
90
90
}
91
91
add_action ( 'init ' , 'register_testimonials_module ' , 0 );
92
+
93
+
94
+ /* To enable custom theme options with acf plugin */
95
+ /**
96
+ * ACF Theme Options
97
+ */
98
+ if ( function_exists ( 'acf_add_options_page ' ) ) {
99
+
100
+ acf_add_options_page (array (
101
+ 'page_title ' => 'Theme Options ' ,
102
+ 'menu_title ' => 'Theme Options ' ,
103
+ 'menu_slug ' => 'theme-general-settings ' ,
104
+ 'capability ' => 'edit_posts ' ,
105
+ 'redirect ' => false ,
106
+ )
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Add ACF Options to Admin Bar
112
+ */
113
+ add_action ( 'admin_bar_menu ' , 'options_adminbar ' , 999 );
114
+
115
+ function options_adminbar ( $ wp_admin_bar ) {
116
+ $ args = array (
117
+ 'id ' => 'theme_options ' ,
118
+ 'title ' => 'Theme Options ' ,
119
+ 'href ' => '/wp-admin/admin.php?page=theme-general-settings ' ,
120
+ );
121
+ $ wp_admin_bar ->add_node ( $ args );
122
+ }
You can’t perform that action at this time.
0 commit comments