Please write below code in “function.php” // create custom plugin settings menuadd_action(‘admin_menu’, ‘social_create_menu’);function social_create_menu() { add_menu_page(‘Theme Settings’, ‘Theme Settings’, ‘administrator’,…
<?php function show_thumb() { global $post, $posts; $thumb = ”; ob_start(); ob_end_clean(); // filter video $output = preg_match_all(‘/(<object.*</object>)/is’, $post->post_content, $matches); …
<?php function codex_custom_init() { $labels = array( ‘name’ => _x(‘Specials’, ‘post type general name’), ‘singular_name’ => _x(‘Special’, ‘post type singular…
add_filter(‘admin_init’, ‘general_settings_register_fields’); function general_settings_register_fields(){ register_setting(‘general’, ‘test_field’, ‘esc_attr’); add_settings_field(‘test_field’, ‘<label for=”test_field”>’.__(‘Test Field’ , ‘test_field’ ).'</label>’ , ‘general_settings_fields_html’, ‘general’);} function general_settings_fields_html(){ $value…
The function returns an image/video and must be called inside the loop. function show_thumb() { global $post, $posts; $thumb =…