Joke Collection Website - Mood Talk - Wordpress blog

Complete wordpress title cleaning code

& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

//remove_action(wp_head ',? wp_enqu

Wordpress blog

Complete wordpress title cleaning code

& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

//remove_action(wp_head ',? wp_enqu

Wordpress blog

Complete wordpress title cleaning code

& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

//remove_action(wp_head ',? wp_enqueue_scripts ',? 1? );

Remove _ Operation (? wp_head ',? feed_links ',? 2? );

Remove _ Operation (? wp_head ',?' feed_links_extra ',? 3? );

Remove _ Operation (? wp_head ',? rsd_link '? );

Remove _ Operation (? wp_head ',? wlwmanifest_link '? );

Remove _ Operation (? wp_head ',? index_rel_link '? );

Remove _ Operation (? wp_head ',?' parent_post_rel_link ',? 10,? 0? );

Remove _ Operation (? wp_head ',?' start_post_rel_link ',? 10,? 0? );

Remove _ Operation (? wp_head ',? adjacent _ posts _ rel _ link _ WP _ head ',? 10,? 0? );

//remove_action(wp_head ',? locale_stylesheet '? );

Remove _ Operation (? publish_future_post ',?' Check _ merge _ publish _ future _ publish',? 10,? 1? );

//remove_action(wp_head ',? noindex ',? 1? );

//remove_action(wp_head ',?' wp_print_styles ',? 8? );

//remove_action(wp_head ',? wp_print_head_scripts ',? 9? );

Remove _ Operation (? wp_head ',? wp_generator '? );

//remove_action(wp_head ',? rel_canonical '? );

Remove _ Operation (? wp_footer ',? wp_print_footer_scripts? );

Remove _ Operation (? wp_head ',?' wp_shortlink_wp_head ',? 10,? 0? );

Remove _ Operation (? template_redirect ',?' wp_shortlink_header ',? 1 1,? 0? ); ?

add_action('widgets_init ',? my _ remove _ recent _ comments _ style’);

Function? my _ remove _ recent _ comments _ style()? {

Global? $ wp _ widget _ factory

remove_action('wp_head ',? Array ($ WP _ widget _ factory->; widgets[' WP _ Widget _ Recent _ Comments '],? recent _ comments _ style ');

}

& gt By inserting this code into the theme functions.php file, a lot of redundant information in WordPress titles can be removed. Let's talk about the specific meaning of these codes first, so as not to delete some functions you want to keep.

Function function

Wp_head () is a very important function of wordpress. Basically all themes will use this function in header.php, and many of them are inserted.

In order to add something to the header, wp_head () will also be used, such as SEO-related plug-ins. But in this position where wp_head () appears, many uncommon generations will be added.

Code, how to delete it? You can delete these codes through remove_action.

Remove _ Action Function

Function prototype: remove _ action ($ tag, $ function _ to _ add, $ priority, $ accepted _ args);

This function deletes a function attached to the specified action hook. This method can be used to remove the default function attached to a specific action hook and possibly replace it with another function.

Important: When adding a hook, the parameters of $function_to_remove and $priority should match so that the hook can be removed. This principle also applies to filters and actions. Do not issue a warning when deletion fails. The article comes from

Parameter article source

1.$tag (string) (required) The operation hook connected to the function to be deleted. Default: None

2.$function_to_remove (callback) (required) Name of the function to be deleted Default value: None.

3.$priority (integer) (optional) Function priority (defined when the function is initially connected) Default value: 10.

4. The number of parameters accepted by the 4.$ accepted _ args (integer) (required) function. Default value: 1

Return value

(Boolean value) Whether the function is deleted.

The 1.Ttue function was successfully removed.

Number 2.2. True the feature False not been removed.