WordPress.org

Ready to get started?Download WordPress

Forums

Arjuna X
Alt title in logo (4 posts)

  1. t..ivanova
    Member
    Posted 1 year ago #

    Hi,

    I want to put alt title in logo img tag, but I don't know how.

    Thanks a lot!

  2. Jared Cornwall
    Member
    Posted 1 year ago #

    Do you need to know how to get to the code and edit it? Or what the HTML looks like?

    Here is an example of the HTML for and img tag:

    <img src="path-to-your-image" alt="Alternate text for your here" title="Tile for your image here" height="100" width="100">

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    For this you need to create a Child Theme.
    http://codex.wordpress.org/Child_Themes

  4. t..ivanova
    Member
    Posted 1 year ago #

    I guess that I should add some function in functions.php to appear alt title. This is what is put for the logo:

    //Logo
    if(isset($_FILES['headerLogo'])) {
    if($_FILES['headerLogo']['type']) {
    if(!eregi('image/', $_FILES['headerLogo']['type'])) {
    //catch error
    $formErrors['headerLogo'] = __('The uploaded file is not a valid image. Only JPEG, PNG and GIF is supported.', 'Arjuna');
    } else {
    // check if valid image
    $info = getimagesize($_FILES['headerLogo']['tmp_name']);
    $supportedMimeTypes = array('image/gif', 'image/jpeg', 'image/png');
    if(!$info || !in_array($info['mime'], $supportedMimeTypes)) {
    //catch error
    $formErrors['headerLogo'] = __('The uploaded file is not a valid image. Only JPEG, PNG and GIF is supported.', 'Arjuna');
    } else {
    list($width, $height) = $info;
    $path = arjuna_get_upload_directory() . '/' . $_FILES['headerLogo']['name'];
    move_uploaded_file($_FILES['headerLogo']['tmp_name'], $path);
    $options['headerLogo'] = arjuna_get_upload_url() . '/' . $_FILES['headerLogo']['name'];
    $options['headerLogo_width'] = $width;
    $options['headerLogo_height'] = $height;
    }
    }
    }
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags