keithg

Wp-content moved to specific Folder – wordpress

Create folder name on root (like.your site name: XYZ) Add code in wp-config.php   wp-content define( ‘WP_CONTENT_DIR’, dirname(__FILE__) . ‘/XYZ/wp-content’ ); define( ‘WP_CONTENT_URL’, ‘http://xyz.com/XYZ/wp-content’ );   Plugins define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/XYZ/wp-content/plugins’ ); define( ‘WP_PLUGIN_URL’, ‘/XYZ/wp-content/plugins’ ); Your site will open from  XYZ/wp-content/  Read more …
keithg

add Text box in setting page – wordpress

Add code in function.php add_filter(‘admin_init’, ‘fbfn’); function fbfn() { register_setting(‘general’, ‘fb_id’, ‘esc_attr’); add_settings_field(‘fb_id’,”.__(‘Become a fan ‘ , ‘fb_id’ ).” , ‘fb_html’, ‘general’); } function fb_html() { $fb = get_option( ‘fb_id’, ” ); echo “<input type=’text’ id=’fb_id’ name=’fb_id’ value='”.$fb.”‘ >”; }  Read more …
keithg

inline javascript and css using hook – wordpress

add_action( ‘wp_head’, ‘print_my_custom_scripts’ ); function print_my_custom_scripts() { print ‘<script type=”text/javascript”>jQuery(document).ready(function() { alert(‘WordPress’)   });</script>’; print ‘<style type=”text/css”>.align{margin-left:32px;}</style>’; }Read more …