Remove Logo through custom admin page (1 post)

  1. Patrick
    Posted 4 years ago #

    I've built a custom 'Theme Otions' admin page by following a Sitepoint tutorial.

    add_action('admin_init', 'register_and_build_fields');
    function register_and_build_fields() {
    add_settings_field('logo','Logo', 'logo_setting', mythemeoptions, 'main_section');
    function logo_setting () {
    	echo '<input type="file" name="logo" />' ;

    In the template files I have placed:
    <img src="<?php echo $options['logo']; ?>" alt="Logo" />

    This works great, except I have no idea how to add a 'Remove Logo' option!

    Any ideas? Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic