Fallback media image for featured image not working in admin column

wp_get_attachment_image_src(156, ‘archive_thumbnail’)[0] will only echo the URL of the image. You need to add it to html to display the image. Try this: echo ‘<img src=”‘.wp_get_attachment_image_src(156, ‘archive_thumbnail’)[0].'”/>’; You could add the width etc as well echo ‘<img src=”‘.wp_get_attachment_image_src(156, ‘archive_thumbnail’)[0].'” width=”.wp_get_attachment_image_src(156, ‘archive_thumbnail’)[1].” height=”.wp_get_attachment_image_src(156, ‘archive_thumbnail’)[2].” />’; what happens if someone deletes this image though? Do you have … Read more

Find Memory Usage of Admin

The easist way is the plugin WP System Health, great plugin and works fine. Alternativ you build a function and hook in wp-admin; example admin_footer

front end editing using iFrames, best approach?

Using a custom template and wp_update_post you should be able to build your own edit/add post pages in your sites frontend. There are also various plugins available that attempt to do similar things. iFrames can be done, but it will need some checks in functions.php to check for a get variable and add conditional stylesheets … Read more

wp_schedule_event only when admin is visited

In your event callback function check to see if the user id the admin then run the function else just reschedule it. So using the example from the codex’s page you linked in the question it would be something like this: function my_activation() { if ( !wp_next_scheduled( ‘my_hourly_event’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘my_hourly_event’); } … Read more

Remove Admin sidebar link

function remove_featured_tax_menu() { remove_submenu_page( ‘edit.php?post_type=movies’, ‘edit-tags.php?taxonomy=featured&amp;post_type=movies’ ); } add_action( ‘admin_menu’, ‘remove_featured_tax_menu’ );