Discuss your project

PartITech blog

Technology blog

Technical analysis, practical guides and field experience to build, modernize and maintain sustainable applications.

232 articles Page 20

WordPress: Add a taxonomy manually

Example of manual addition of a taxonomy (without going through the configuration).To be placed in the functions.php file: /** * Manual add new Field to taxonomy or you can use plugin "taxonomy manager" * * BEGIN */ // A callback function to add a custom field to our "expertise" taxonomy function expertise_taxonomy_custom_fields($tag) { // Check for existing taxonomy meta for the term you're editing $t_id = $tag->term_id; // Get the ID of the term you're editing $term_meta = get_optio...

WordPress: Remove update notifications

Place in the functions.php file: $func = function ($a) { global $wp_version; return (object) array( 'last_checked' => time(), 'version_checked' => $wp_version, ); }; add_filter('pre_site_transient_update_core', $func); add_filter('pre_site_transient_update_plugins', $func); add_filter('pre_site_transient_update_themes', $func); Reproduce this customization today The principle of the hook remains useful, but the administration screens and WordPress APIs have evolved since the...

WordPress: Customize the admin footer

To be placed in the functions.php file: function modify_footer_admin () { echo 'Created by <a href="http://www.partitech.com">Partitech</a>.'; } if (is_admin()) { add_filter('admin_footer_text', 'modify_footer_admin'); } Reproduce this customization today The principle of the hook remains useful, but the administration screens and WordPress APIs have evolved since the publication. Test the code in a staging environment with the exact version of the site's core,...

WordPress: Remove default elements in the header

In some cases, we need to remove all the default meta tags from WordPress templates. To do this, simply add the following code to your functions.php file remove_action('wp_head', 'wp_print_styles', 8); remove_action('wp_head', 'wp_print_head_scripts', 9); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_he...