Paramétrage de WordPress

Optimiser le paramétrage du CMS WordPress.


Afficher le texte alternatif dans la colonne des médias de WordPress (Ch.23.)

Ajoutez ce code dans le fichier functions.php : [pastacode lang= »php » manual= »function%20seomix_adm_media_attachment_alt(%24cols)%20%7B%0A%09%24cols%5B%22alt%22%5D%20%3D%20’ALT%20Text’%3B%0A%09return%20%24cols%3B%0A%7D%0Afunction%20seomix_adm_media_attachment_alt_content(%24column_name%2C%20%24id)%20%7B%0A%09if%20(%20%24column_name%20%3D%3D%3D%20’alt’%20)%20%7B%0A%09%09echo%20get_post_meta(%20%24id%2C%20’_wp_attachment_image_alt’%2C%20true)%3B%0A%09%7D%0A%7D%0Aadd_filter(‘manage_media_columns’%2C%20’seomix_adm_media_attachment_alt’%2C%201)%3B%0Aadd_action(‘manage_media_custom_column’%2C%20’seomix_adm_media_attachment_alt_content’%2C%201%2C%202)%3B » message= » » highlight= » » provider= »manual »/]

Supprimer des menus dans l’administration de WordPress (ch.23.)

[pastacode lang= »php » message= » » highlight= » » provider= »manual » manual= »%2F**%0ASupprimer%20des%20menus%0A*%2F%0Afunction%20seomix_adm_content_contributor_remove_menu()%20%7B%0Aglobal%20%24menu%3B%0Aremove_menu_page(‘wpcf7’)%3B%20%2F*%20Plugin%20Contact%20Form%207*%2F%0Aunset(%24menu%5B10%5D)%3B%20%2F%2F%20M%C3%A9dias%0Aunset(%24menu%5B25%5D)%3B%20%2F%2F%20Commentaires%0Aunset(%24menu%5B75%5D)%3B%20%2F%2F%20Outils%0Aunset(%24menu%5B15%5D)%3B%20%2F%2F%20Liens%0Aunset(%24menu%5B60%5D)%3B%20%2F%2F%20Apparence%0Aunset(%24menu%5B65%5D)%3B%20%2F%2F%20Plugins%0Aunset(%24menu%5B70%5D)%3B%20%2F%2F%20Utilisateurs%0Aunset(%24menu%5B80%5D)%3B%20%2F%2F%20R%C3%A9glages%0A%7D%0Aadd_action(‘admin_head’%2C%20’seomix_adm_content_contributor_remove_menu’)%3B »/]

© 2013-2024 Optimiser son référencement WordPress, le livre - Par Daniel Roch


Theme by Anders NorenHaut de page ↑