I need to add some styles that only take effect in the WordPress Admin area, to do it, add this to functions.php
add_action('admin_head', 'my_custom_styles'); function my_custom_styles() { echo '<style> // Add styles here </style>'; }
I need to add some styles that only take effect in the WordPress Admin area, to do it, add this to functions.php
add_action('admin_head', 'my_custom_styles'); function my_custom_styles() { echo '<style> // Add styles here </style>'; }
On a project I’m doing, I created a custom post type for a catalogue and want the featured image to display on the admin table.
My custom post type is called “product” and I want to limit the feature to only the “product” custom post type. Here’s how I did it.
I added this into functions.php
Want to add your post’s featured image to your admin columns on WordPress? It’s straight forward, just copy the below code and paste it into your functions.php.