Skip to content

Instantly share code, notes, and snippets.

@veirus
Created November 9, 2017 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veirus/2eaf7757485184560d5c31b8cced89f8 to your computer and use it in GitHub Desktop.
Save veirus/2eaf7757485184560d5c31b8cced89f8 to your computer and use it in GitHub Desktop.
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'menu_title' => 'Настройки контента',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
//'icon_url' => '/wp-content/themes/tt_landing/favicon.png',
'post_id' => 'options',
'position' => 2,
'redirect' => true
));
acf_add_options_sub_page(array(
'page_title' => 'Основные настройки',
'menu_title' => 'Основные',
'parent_slug' => 'theme-general-settings',
'menu_slug' => 'theme-main-options',
));
}
// remove text autoformat
remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment