Appearance -> Custom Codes after installing the plugin. * Version: 3.5 * Author: Saifudheen Mak * Author URI: https://maktalseo.com * License: GPL2 * Text Domain: add-custom-codes */ add_action( 'init', 'accodes_load_textdomain' ); function accodes_load_textdomain() { load_plugin_textdomain( 'add-custom-codes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } /*--------------------------------- styles and scripts for plugin page -----------------------------------------*/ add_action('admin_enqueue_scripts', 'codemirror_enqueue_scripts'); function codemirror_enqueue_scripts($hook) { $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'htmlmixed')); wp_localize_script('jquery', 'cm_settings', $cm_settings); wp_enqueue_script('wp-theme-plugin-editor'); wp_enqueue_style('wp-codemirror'); wp_register_style( 'add-custom-codes', plugins_url( 'add-custom-codes/css/styles.css' ), '', '3.5' ); wp_enqueue_style( 'add-custom-codes' ); wp_register_script( 'add-custom-codes1', plugins_url( 'add-custom-codes/js/script.js' ), '', '3.5' ); wp_enqueue_script( 'add-custom-codes1' ); } /*------------------------------ add menu icon ------------------------*/ add_action('admin_menu', 'accodes_menu'); function accodes_menu() { add_theme_page('Add Custom Codes', 'Custom Codes', 'administrator', 'add-custom-codes', 'accodes_settings_page'); } function accodes_settings_page() { ?>


You can add custom css codes below. Do not include <style> and </style> tags:


Codes for <head> section of your website. Google Search Console Verification, Bing Verification and any other meta codes one at a line:


Codes to add before </body> section of your website. Google Anayltics Tracking Code, Facebook Scripts, third party ad scripts etc. Be sure to include <script> and </script> tags provided by the party:

Happy with the plugin?

Please donate something to support further development of this plugin and other new plugins that are on the way. You can choose how much to donate!

Donate
'. PHP_EOL; $outputto .= ''.PHP_EOL; $outputto .= ''.PHP_EOL; echo $outputto; } } /*--------------------------------- output Footer Codes ----------------*/ add_action( 'wp_footer', 'accodes_footer_output' ); function accodes_footer_output() { $options = get_option( 'custom-footer-codes-input' ); if($options!="") { $outputto = PHP_EOL.''. PHP_EOL; $outputto .= $options; $outputto .= ''.PHP_EOL; $outputto .=''.PHP_EOL; echo $outputto; } } /*--------------------------------- output Header Codes ----------------*/ add_action( 'wp_head', 'accodes_header_output' ); function accodes_header_output() { $options = get_option( 'custom-header-codes-input' ); if($options!='') { $outputto = PHP_EOL.''. PHP_EOL; $outputto .= $options; $outputto .= ''.PHP_EOL; $outputto .= ''.PHP_EOL; echo $outputto; } } ?>