Category: Advance

How to Create Custom add_action Hooks in WordPress

WordPress is based on Hook-System .WordPress Have Lot of Predefined hooks line. add_action("init" ,'Function name'); add_action( 'muplugins_loaded', 'plugin_override' ); add_action( 'wp_loaded', 'your callback function' ); add_action( 'the_post', 'he_post_action' );add_action("init" ,'Function name'); add_action( 'muplugins_loaded', 'plugin_override' ); add_action( 'wp_loaded', 'your callback function' ); add_action( 'the_post', 'he_post_action' ); Suppose we need to create over own hook here what

Smart Way to Use Filters in wordpress

Today I’ll Going to Show You Have to Override a function using Filter hook In this Example ,I wrote a simple function that append a simple text function wpdadd_text($data){ return $data ; }   add_filter('simple_text" ','wpdadd_text' ,10,3);   $values = apply_filters('simple_text','Welcome to WpDad');function wpdadd_text($data){ return $data ; } add_filter('simple_text" ','wpdadd_text' ,10,3); $values = apply_filters('simple_text','Welcome to

How to Changed the Default Theme Twenty Fourteen theme for WordPress Multi site.

When You Create A New Site In WordPress Multi site. WordPress Assigned Twenty Fourteen Theme Automatically .If You Want To Changed Twenty Fourteen Theme With Other Customs Themes. IF you Want All the multi site need to Use the Same Theme You Need to Override the wp-config.php   define('WP_DEFAULT_THEME', 'Theme Folder name'); define('WP_DEFAULT_THEME', 'Theme Folder